parse responseText for error model

This commit is contained in:
Kyle Spearrin 2017-10-24 14:48:58 -04:00
parent c2a49d1074
commit 58fe7dcda4
1 changed files with 3 additions and 0 deletions

View File

@ -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;