-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Error type [Breaking]: reveal details less liberally
Previously, we only checked `isJSONAPIReady` before reading in the error’s `message`—and even then only for the `title`, not for `details`—but we didn’t require `isJSONAPIReady` to migrate over the `code` and other properties. This was a security risk, since APIErrors are displayed to the client directly, so they should only expose info that the user has explicitly signaled is safe. This commit also stops referencing err.message for both the JSON API Error’s `title` and `details` property; instead, `message` can only go into `details`. This is more consistent with JSON API semantics and prevents the odd case in which `title` and `details` are the same
- Loading branch information
1 parent
ffc537b
commit f1477c7
Showing
2 changed files
with
30 additions
and
15 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