-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: introduce
ErrorWithKey
(locales keys as error code) (#621)
- Introduces following helpers: - `ErrorWithKey` (extends `Error`; useful for throwing with stack-trace) - `errorWithKey` (lighter version of `ErrorWithKey`; useful when stack-trace not needed) - `isErrorWithKey` (checks if an object is `ErrorWithKey` or response of `errorWithKey`) - Extends `ErrorResponse` and `failure` to have optional `{error?: ErrorWithKeyLike}` - Extends translation/localization helpers (`t`, `useTranslation`) to allow converting `ErrorWithKeyLike` to string
- Loading branch information
1 parent
9bb2bad
commit 1447173
Showing
4 changed files
with
76 additions
and
11 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
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