mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
parse responseText for error model
This commit is contained in:
@@ -94,6 +94,9 @@ var ErrorResponse = function (response, identityResponse) {
|
|||||||
else if (response.responseJSON) {
|
else if (response.responseJSON) {
|
||||||
errorModel = response.responseJSON;
|
errorModel = response.responseJSON;
|
||||||
}
|
}
|
||||||
|
else if (response.responseText && response.responseText.indexOf('{') === 0) {
|
||||||
|
errorModel = JSON.parse(response.responseText);
|
||||||
|
}
|
||||||
|
|
||||||
if (errorModel) {
|
if (errorModel) {
|
||||||
this.message = errorModel.Message;
|
this.message = errorModel.Message;
|
||||||
|
|||||||
Reference in New Issue
Block a user