chore: refactor response error handling

This commit is contained in:
Ramires Viana
2022-05-04 12:11:36 +00:00
parent d1d7b23da6
commit 96afaca0ad
16 changed files with 61 additions and 93 deletions

View File

@@ -38,15 +38,8 @@ export default {
},
props: ["errorCode", "showHeader"],
computed: {
code() {
return this.errorCode === "0" ||
this.errorCode === "404" ||
this.errorCode === "403"
? parseInt(this.errorCode)
: 500;
},
info() {
return errors[this.code];
return errors[this.errorCode] ? errors[this.errorCode] : errors[500];
},
},
};