1
0
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:
Kyle Spearrin
2017-10-24 14:48:58 -04:00
parent c2a49d1074
commit 58fe7dcda4

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;