-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: tweak latest blocks jotai config * fix: handle bad routes * fix: bug in keyreg transaction mapping
- Loading branch information
1 parent
ba6907f
commit 931c888
Showing
3 changed files
with
37 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
export const asError = (error: unknown) => { | ||
return error instanceof Error ? error : new Error(String(error)) | ||
return error instanceof Error | ||
? error | ||
: error instanceof Object && 'error' in error && error.error instanceof Error | ||
? error.error | ||
: new Error(String(error)) | ||
} | ||
|
||
export const is404 = (error: Error) => 'status' in error && error.status === 404 |