chore: refactor response error handling

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

No files matched your search

+1 -8
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];
},
},
};