Skip to content
Snippets Groups Projects

Resolve "Consistent error handling in frontend"

Merged Dominik Seeger requested to merge 148-consistend-error-handling-in-frontend into master
All threads resolved!
@@ -4,12 +4,12 @@ import { parseErrorNotification, parseBlacklist } from '@/util/helpers'
const errorUrlBlacklist = [
"/api/get-token/",
]
const blackListRegExp = new RegExp(parseBlacklist(errorUrlBlacklist), "g")
export function errorInterceptor (error: any): any {
// TODO: log errors and store them somewhere
const blacklistString = parseBlacklist(errorUrlBlacklist)
if (error.response.request.responseURL.match(new RegExp(blacklistString, "g"))) {
if (error.response.request.responseURL.match(blackListRegExp)) {
console.log("ignore")
return
}
Loading