Skip to content

Commit

Permalink
Throw errors only for 4xx & 5xx
Browse files Browse the repository at this point in the history
  • Loading branch information
exacs committed Jul 10, 2024
1 parent d801132 commit 326db6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/canvasApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class CanvasApi {
throw new CanvasApiConnectionError();
});

if (response.statusCode >= 300) {
if (response.statusCode >= 400) {
throw await CanvasApiResponseError.fromResponse(response);
}

Expand Down

0 comments on commit 326db6c

Please sign in to comment.