diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-11 22:57:56 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-11 22:57:56 -0400 |
| commit | 756863f298f9e4277863f9e8758e253c5ae95923 (patch) | |
| tree | 82a9c6643b360b035f4630f2b1db138d9937c8d8 /ui | |
| parent | 812f1cafe3f8a68bf45b677fade7417c30d92eac (diff) | |
Return a distinct error when an invite username is in use.
I've also aligned channel creation with this (it's 409 Conflict). To make server setup more distinct, it now returns 503 Service Unavailable if setup has not been completed.
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/lib/apiServer.js | 2 | ||||
| -rw-r--r-- | ui/routes/(app)/+layout.svelte | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/lib/apiServer.js b/ui/lib/apiServer.js index 46fcb53..76ecb87 100644 --- a/ui/lib/apiServer.js +++ b/ui/lib/apiServer.js @@ -3,7 +3,7 @@ import { channelsList, logins, messages } from '$lib/store'; export const apiServer = axios.create({ baseURL: '/api/', - validateStatus: (status) => status >= 200 && status < 500, + validateStatus: () => true, }); export async function boot() { diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte index 38df9b9..9abaaf4 100644 --- a/ui/routes/(app)/+layout.svelte +++ b/ui/routes/(app)/+layout.svelte @@ -36,7 +36,7 @@ currentUser.update(() => null); goto('/login'); break; - case 409: + case 503: currentUser.update(() => null); goto('/setup'); break; |
