mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added 403 errors to the error handler (#21898)
ref ENG-745 - added permission related errors to list of error types to be handled - previously, generic error messages were displayed when permission errors are thrown - this would make it possible to display the actual message returned from the API in toasts
This commit is contained in:
parent
4ec0bdde3c
commit
65bec88187
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ const handleResponse = async (response: Response) => {
|
|||
throw new VersionMismatchError(response, data);
|
||||
} else if (data.errors?.[0]?.type === 'ValidationError') {
|
||||
throw new ValidationError(response, data);
|
||||
} else if (data.errors?.[0]?.type === 'NoPermissionError') {
|
||||
throw new ValidationError(response, data);
|
||||
} else if (data.errors?.[0]?.type === 'ThemeValidationError') {
|
||||
throw new ThemeValidationError(response, data);
|
||||
} else if (data.errors?.[0]?.type === 'HostLimitError') {
|
||||
|
|
Loading…
Add table
Reference in a new issue