Skip to content

Commit 3878ee1

Browse files
committed
fix: error handling for network connection
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent e6f1950 commit 3878ee1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/renderer/utils/api/errors.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('renderer/utils/api/errors.ts', () => {
8383
});
8484

8585
it('network error - no status', () => {
86-
const mockError = new RequestError('Network error', 0, {
86+
const mockError = new RequestError('Network error', 500, {
8787
request: {
8888
method: 'GET',
8989
url: 'https://api.github.com',
@@ -94,8 +94,8 @@ describe('renderer/utils/api/errors.ts', () => {
9494
expect(result).toBe(Errors.NETWORK);
9595
});
9696

97-
it('unknown error - unhandled 403', () => {
98-
const mockError = new RequestError('Forbidden', 403, {
97+
it('unknown error - unhandled 418', () => {
98+
const mockError = new RequestError('Forbidden', 418, {
9999
request: {
100100
method: 'GET',
101101
url: 'https://api.github.com',

0 commit comments

Comments
 (0)