Skip to content

Commit

Permalink
Fixed #301 dealing with faucet errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvelmer committed Nov 15, 2023
1 parent cd6dd94 commit 160614a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export abstract class API {
return API.isUndefinedError(error, err['error']);
}
} else if (err) {
return API.isUndefinedError(error, err as string);
const errorMessage = err['error'] ? (err['error'] as string) : (err as string);
return API.isUndefinedError(error, errorMessage);
}
return API.isUndefinedError(error);
}
Expand Down

0 comments on commit 160614a

Please sign in to comment.