mirror of
https://github.com/bitwarden/browser.git
synced 2025-03-11 13:30:39 +01:00
Remove try-catch to display proper api-errors (#5570)
This commit is contained in:
parent
72a5ba455c
commit
3b708d9311
@ -35,13 +35,9 @@ export class SimpleLoginForwarder implements Forwarder {
|
|||||||
if (response.status === 401) {
|
if (response.status === 401) {
|
||||||
throw "Invalid SimpleLogin API key.";
|
throw "Invalid SimpleLogin API key.";
|
||||||
}
|
}
|
||||||
try {
|
const json = await response.json();
|
||||||
const json = await response.json();
|
if (json?.error != null) {
|
||||||
if (json?.error != null) {
|
throw "SimpleLogin error:" + json.error;
|
||||||
throw "SimpleLogin error:" + json.error;
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// Do nothing...
|
|
||||||
}
|
}
|
||||||
throw "Unknown SimpleLogin error occurred.";
|
throw "Unknown SimpleLogin error occurred.";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user