@hmcts/ccpay-web-component 5.0.1-beta07 → 5.0.1-beta08

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -219,7 +219,12 @@ var ErrorHandlerService = /** @class */ (function () {
219
219
  }
220
220
  }
221
221
  else if (err.error.messsage === undefined) {
222
- errorMessage = JSON.parse(err.error).error;
222
+ if (typeof err.error === 'object') {
223
+ errorMessage = JSON.parse(JSON.stringify(err.error)).error;
224
+ }
225
+ else {
226
+ errorMessage = JSON.parse(err.error).error;
227
+ }
223
228
  }
224
229
  else {
225
230
  if (err.error.message !== undefined) {