mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user