mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +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) {
|
||||
errorModel = response.responseJSON;
|
||||
}
|
||||
else if (response.responseText && response.responseText.indexOf('{') === 0) {
|
||||
errorModel = JSON.parse(response.responseText);
|
||||
}
|
||||
|
||||
if (errorModel) {
|
||||
this.message = errorModel.Message;
|
||||
|
||||
Reference in New Issue
Block a user