This commit is contained in:
2019-04-30 20:09:11 +00:00
parent 6391ea3a12
commit 3495a56d04
3 changed files with 14 additions and 16 deletions

View File

@@ -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 {

View File

@@ -90,7 +90,8 @@ export default {
"ErrorAPI2208",
"ErrorAPI2209",
"ErrorServerUnresponsive",
"ErrorUserNotAuthenticated"
"ErrorUserNotAuthenticated",
"ErrorUserNotAuthorized"
],
decimalValidate(required) {
return { required: required, decimal: [2, this.formats.decimalSeparator] };