Skip to content

Commit

Permalink
fix: typecheck & anyify parsedRes since it's unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
DawsonGodin committed Jul 29, 2024
1 parent 602d08c commit 4a3f4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/rest/src/lib/handlers/SequentialHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class SequentialHandler implements IHandler {
if (res.ok) {
return parsedRes;
} else if (res.status === 400 || res.status === 401 || res.status === 404) {
if (!parsedRes?.authorized) {
if (typeof parsedRes === 'object' && !(parsedRes as any)?.authorized) {
return parsedRes;
} else {
throw new APIError(parsedRes as string, data.type, data.fullUrl, res.status, data);
Expand Down

0 comments on commit 4a3f4b6

Please sign in to comment.