@hmcts/ccpay-web-component 4.0.0-beta558 → 4.0.0-beta559

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,6 +219,14 @@ var ErrorHandlerService = /** @class */ (function () {
219
219
  errorMessage = err.error;
220
220
  }
221
221
  }
222
+ else if (err.status === 400) {
223
+ if (typeof err !== 'string') {
224
+ errorMessage = JSON.parse(err.error)["error"];
225
+ }
226
+ if (errorMessage === '') {
227
+ errorMessage = err.error.toString().replace(/"/g, "");
228
+ }
229
+ }
222
230
  else if (err.error) {
223
231
  if (typeof err.error === 'string') {
224
232
  errorMessage = err.error.toString().replace(/"/g, "");