fix: native gitlab & github login

This commit is contained in:
2024-11-17 21:15:25 +07:00
parent 83d0ed380d
commit 95f9f76edd
10 changed files with 92 additions and 112 deletions
+3 -2
View File
@@ -27,8 +27,9 @@ const api = ofetch.create({
throw new Error("Unauthorized");
}
if (error.response._data) {
const message = error.response._data.message;
const data = error.response._data;
if (data) {
const message = typeof data === "string" ? data : data?.message;
throw new Error(message || "Something went wrong");
}
},