Migrate to rAuth v1.

This commit is contained in:
Paul
2021-09-11 17:36:23 +01:00
parent a4138b52b0
commit 5b422b89e3
15 changed files with 116 additions and 87 deletions

View File

@@ -9,7 +9,10 @@ export function takeError(error: any): string {
const type = error?.response?.data?.type;
const id = type;
if (!type) {
if (error?.response?.status === 403) {
if (
error?.response?.status === 401 ||
error?.response?.status === 403
) {
return "Unauthorized";
} else if (error && !!error.isAxiosError && !error.response) {
return "NetworkError";