mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
catch fastmail errors in notCreated response prop (#3395)
This commit is contained in:
parent
33af940515
commit
231e1bf666
@ -54,7 +54,15 @@ export class FastmailForwarder implements Forwarder {
|
||||
json.methodResponses[0].length > 0
|
||||
) {
|
||||
if (json.methodResponses[0][0] === "MaskedEmail/set") {
|
||||
return json.methodResponses[0][1]?.created?.["new-masked-email"]?.email;
|
||||
if (json.methodResponses[0][1]?.created?.["new-masked-email"] != null) {
|
||||
return json.methodResponses[0][1]?.created?.["new-masked-email"]?.email;
|
||||
}
|
||||
if (json.methodResponses[0][1]?.notCreated?.["new-masked-email"] != null) {
|
||||
throw (
|
||||
"Fastmail error: " +
|
||||
json.methodResponses[0][1]?.notCreated?.["new-masked-email"]?.description
|
||||
);
|
||||
}
|
||||
} else if (json.methodResponses[0][0] === "error") {
|
||||
throw "Fastmail error: " + json.methodResponses[0][1]?.description;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user