@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.
@@ -208,6 +208,14 @@
208
208
  errorMessage = err.error;
209
209
  }
210
210
  }
211
+ else if (err.status === 400) {
212
+ if (typeof err !== 'string') {
213
+ errorMessage = JSON.parse(err.error)["error"];
214
+ }
215
+ if (errorMessage === '') {
216
+ errorMessage = err.error.toString().replace(/"/g, "");
217
+ }
218
+ }
211
219
  else if (err.error) {
212
220
  if (typeof err.error === 'string') {
213
221
  errorMessage = err.error.toString().replace(/"/g, "");