0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Removed detail rule from showAPIError

refs: https://github.com/TryGhost/Team/issues/1121

- showAPIError is a method intended for formatting errors from the Ghost API
- Ghost API Errors do not have a detail field, therefore this code was redundant
- there are also no related tests
- removing now because I'm trying to cleanup and streamline all our error handling code
This commit is contained in:
Hannah Wolfe 2022-11-23 15:18:00 +00:00
parent c740eecaec
commit 32353f2920

View file

@ -180,8 +180,6 @@ export default class NotificationsService extends Service {
msg = GENERIC_ERROR_MESSAGE;
} else if (resp instanceof String) {
msg = resp;
} else if (!isBlank(resp?.detail)) {
msg = resp.detail;
} else if (!isBlank(resp?.message)) {
msg = resp.message;
}