From 58fe7dcda4100283059376afd93431c35b84bffe Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 24 Oct 2017 14:48:58 -0400 Subject: [PATCH] parse responseText for error model --- src/models/api/responseModels.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/models/api/responseModels.js b/src/models/api/responseModels.js index d7636dd9..6944f8c2 100644 --- a/src/models/api/responseModels.js +++ b/src/models/api/responseModels.js @@ -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;