From 0c7b35ffde9646e046cdba7f39ff7f2a2681cc97 Mon Sep 17 00:00:00 2001 From: Daniel Janeiro Date: Sat, 7 Oct 2017 21:51:58 +0100 Subject: [PATCH] Add cannot ignore staff error --- errors.js | 9 ++++++++- locales/en.yml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/errors.js b/errors.js index ab1667e07..dca3f0511 100644 --- a/errors.js +++ b/errors.js @@ -195,6 +195,12 @@ const ErrAssetURLAlreadyExists = new APIError('Asset URL already exists, cannot status: 409 }); +// ErrCannotIgnoreStaff is returned when a user tries to ignore a staff member. +const ErrCannotIgnoreStaff = new APIError('Cannot ignore staff members.', { + translation_key: 'CANNOT_IGNORE_STAFF', + status: 400 +}); + module.exports = { ExtendableError, APIError, @@ -221,5 +227,6 @@ module.exports = { ErrLoginAttemptMaximumExceeded, ErrEditWindowHasEnded, ErrCommentTooShort, - ErrAssetURLAlreadyExists + ErrAssetURLAlreadyExists, + ErrCannotIgnoreStaff }; diff --git a/locales/en.yml b/locales/en.yml index 03a445940..1687ab1df 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -206,6 +206,7 @@ en: NOT_FOUND: "Resource not found" ALREADY_EXISTS: "Resource already exists" INVALID_ASSET_URL: "Assert URL is invalid" + CANNOT_IGNORE_STAFF: "Cannot ignore Staff members." email: "Not a valid E-Mail" confirm_password: "Passwords don't match. Please check again" network_error: "Failed to connect to server. Check your internet connection and try again."