@hmcts/ccd-case-ui-toolkit 7.0.5 → 7.0.6-mv-upgrade-rc1

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.
@@ -1241,14 +1241,9 @@ class HttpError {
1241
1241
  }
1242
1242
  static from(response) {
1243
1243
  const error = new HttpError();
1244
- if (response?.status === 429) {
1245
- error.error = HttpError.MESSAGE_ERROR_429;
1246
- error.status = response.status;
1247
- error.message = response.message;
1248
- }
1249
1244
  // Check that the HttpErrorResponse contains an "error" object before mapping the error properties
1250
1245
  if (!!(response && response.error)) {
1251
- Object.keys(error).forEach((key) => {
1246
+ Object.keys(error).forEach(key => {
1252
1247
  error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
1253
1248
  });
1254
1249
  }
@@ -1265,7 +1260,6 @@ class HttpError {
1265
1260
  HttpError.DEFAULT_ERROR = 'Unknown error';
1266
1261
  HttpError.DEFAULT_MESSAGE = 'Something unexpected happened, our technical staff have been automatically notified';
1267
1262
  HttpError.DEFAULT_STATUS = 500;
1268
- HttpError.MESSAGE_ERROR_429 = 'Your request was rate limited. Please wait a few seconds before retrying your document upload';
1269
1263
 
1270
1264
  /**
1271
1265
  * `Oauth2Service` and `AuthService` cannot be merged as it creates a cyclic dependency on `AuthService` through `HttpErrorService`.