This commit is contained in:
@@ -75,10 +75,16 @@ export default {
|
||||
status(response) {
|
||||
//Handle expected api errors
|
||||
if (response.status == 401) {
|
||||
//must reject if not authorized
|
||||
//must reject if not Authenticated
|
||||
return Promise.reject(new Error("[ErrorUserNotAuthenticated]"));
|
||||
}
|
||||
|
||||
if (response.status == 403) {
|
||||
//must reject if not Authorized
|
||||
return Promise.reject(new Error("[ErrorUserNotAuthorized]"));
|
||||
}
|
||||
|
||||
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return Promise.resolve(response);
|
||||
} else {
|
||||
|
||||
@@ -90,7 +90,8 @@ export default {
|
||||
"ErrorAPI2208",
|
||||
"ErrorAPI2209",
|
||||
"ErrorServerUnresponsive",
|
||||
"ErrorUserNotAuthenticated"
|
||||
"ErrorUserNotAuthenticated",
|
||||
"ErrorUserNotAuthorized"
|
||||
],
|
||||
decimalValidate(required) {
|
||||
return { required: required, decimal: [2, this.formats.decimalSeparator] };
|
||||
|
||||
Reference in New Issue
Block a user