mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-02 04:46:18 -05:00
API will start without DB.
This commit is contained in:
parent
76291d2258
commit
163b14c294
10 changed files with 111 additions and 48 deletions
|
|
@ -48,18 +48,7 @@ async function apiCall(url, method, body, ms = 20000) {
|
|||
return response;
|
||||
} catch (e) {
|
||||
// Timeout, or some other exception.
|
||||
if (e.message === 'promise timeout') {
|
||||
toast({
|
||||
type: 'error',
|
||||
title: 'Server failed to respond!',
|
||||
description: 'Timeout while waiting for server response. See server logs.',
|
||||
time: 5000,
|
||||
});
|
||||
} else {
|
||||
toast({
|
||||
type: 'error', title: 'Error!', description: 'See client logs', time: 5000,
|
||||
});
|
||||
}
|
||||
console.error(e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue