diff --git a/src/util/data.js b/src/util/data.js index 65d23ce..1de5b64 100644 --- a/src/util/data.js +++ b/src/util/data.js @@ -14,7 +14,7 @@ export async function fetch(url, init) { return { data: await res.json(), error: null } } } catch (e) { - return { data: null, error: "api call failed: " + e } + return { data: null, error: "api call failed: " + e.message } } } @@ -37,7 +37,7 @@ export async function login(username, password, remotesourcename) { return { data: await res.json(), error: null } } } catch (e) { - return { data: null, error: "api call failed: " + e } + return { data: null, error: "api call failed: " + e.message } } } @@ -61,7 +61,7 @@ export async function register(username, remotesourcename, remoteloginname, remo return { data: await res.json(), error: null } } } catch (e) { - return { data: null, error: "api call failed: " + e } + return { data: null, error: "api call failed: " + e.message } } }