fix(web): auth fallback to login instead of error (#331)

This commit is contained in:
Ludvig Lundgren 2022-07-02 17:49:59 +02:00 committed by GitHub
parent 00ef566450
commit 5ef2ea04b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ export async function HttpClient<T>(
AuthContext.reset();
// Show an error toast to notify the user what occurred
return Promise.reject(new Error("Unauthorized."));
return Promise.resolve(response);
}
return Promise.reject(new Error(await response.text()));