@energycap/components 0.39.14-ECAP-24583-parse-bc-api-errors.20240409-1017 → 0.39.14

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.
@@ -6599,7 +6599,7 @@ function isApiError(errorResponse) {
6599
6599
  return true;
6600
6600
  }
6601
6601
  // BillCAPture APIs return errors in a different format
6602
- if (errorResponse.error && errorResponse.error.hasOwnProperty('message')) {
6602
+ if (errorResponse.error && errorResponse.error.hasOwnProperty('Message')) {
6603
6603
  return true;
6604
6604
  }
6605
6605
  return false;
@@ -6622,7 +6622,7 @@ class ErrorService {
6622
6622
  let apiErrorMessage = unknownErrorDefault || 'DefaultUnknownError_SC';
6623
6623
  if (errorResponse && isApiError(errorResponse)) {
6624
6624
  try {
6625
- apiErrorMessage = errorResponse.error.status?.message || errorResponse.error.message;
6625
+ apiErrorMessage = errorResponse.error.status?.message || errorResponse.error.Message;
6626
6626
  }
6627
6627
  catch (error) {
6628
6628
  //log the real error to the console (for developers) but just return the generic error to the user