mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
Fix to display message in toast when user is forbidden to do something
Translation does not work
This commit is contained in:
@@ -21,9 +21,7 @@ const makeFetch = (method, url, body) => {
|
||||
}
|
||||
|
||||
if (response.status === 403) {
|
||||
return response.json().then(() => {
|
||||
throw AccessException();
|
||||
});
|
||||
throw AccessException();
|
||||
}
|
||||
|
||||
throw {
|
||||
@@ -95,7 +93,7 @@ const ValidationException = (response) => {
|
||||
const AccessException = () => {
|
||||
const error = {};
|
||||
error.name = 'AccessException';
|
||||
error.violations = ['You are no longer permitted to perform this action'];
|
||||
error.violations = ['You are not allowed to perform this action'];
|
||||
|
||||
return error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user