do not show "Notification not found" error messages (#10931)

* start fixing #10391

* do not show snackbars for notifications not found

* revert message changes

* update tests

* add new test

* fix property
This commit is contained in:
Matteo Pagliazzi
2019-01-13 11:43:02 +01:00
committed by GitHub
parent a08cca807a
commit f63d2e47f0
8 changed files with 59 additions and 22 deletions

View File

@@ -41,6 +41,25 @@ export const BadRequest = common.errors.BadRequest;
*/
export const NotFound = common.errors.NotFound;
/**
* @apiDefine NotificationNotFound
* @apiError NotificationNotFound The notification was not found.
*
* @apiErrorExample Error-Response:
* HTTP/1.1 404 Not Found
* {
* "error": "NotificationNotFound",
* "message": "Notification not found."
* }
*/
export class NotificationNotFound extends NotFound {
constructor (language) {
super(common.i18n.t('messageNotificationNotFound', language));
this.name = this.constructor.name;
}
}
/**
* @apiDefine InternalServerError
* @apiError InternalServerError An unexpected error occurred.