fixed return values from backend
This commit is contained in:
1 parent
c461640957
commit
7526b578ba
3 files changed
+20
-14
No files matched your search
@@ -34,15 +34,9 @@ export const makeRemoteAPI = (baseURL: string): API => ({
|
||||
return response;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
let error = String(err);
|
||||
|
||||
if (err instanceof Error) {
|
||||
error += ` ${err.stack}`;
|
||||
}
|
||||
|
||||
return {
|
||||
ok: false,
|
||||
error,
|
||||
error: `Server error: ${method} ${path}`,
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user