mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-08 09:32:07 +01:00
parse responseText for error model
This commit is contained in:
parent
c2a49d1074
commit
58fe7dcda4
@ -94,6 +94,9 @@ var ErrorResponse = function (response, identityResponse) {
|
||||
else if (response.responseJSON) {
|
||||
errorModel = response.responseJSON;
|
||||
}
|
||||
else if (response.responseText && response.responseText.indexOf('{') === 0) {
|
||||
errorModel = JSON.parse(response.responseText);
|
||||
}
|
||||
|
||||
if (errorModel) {
|
||||
this.message = errorModel.Message;
|
||||
|
Loading…
Reference in New Issue
Block a user