Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10936

Salesforce Login exception: the error code is not reported properly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.19.0
    • Component/s: camel-salesforce
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      As per SalesforceSession's login exception handling [1] a message is computed to report both the error code and its description but then, when an object of type RestError is created, the computed message is used to set the RestError's code.

      IMHO, the error code provided by SalesForce should be reported as it is, then the computed message can be set for RestError's message so instead of:

      errors.add(new RestError(msg, error.getErrorDescription()));
      

      It should be:

      errors.add(new RestError(error.getError(), msg));
      

      This helps to easily handle different error codes as one do not need to parse the error message.

      [1] https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java#L199

        Attachments

          Activity

            People

            • Assignee:
              zregvart Zoran Regvart
              Reporter:
              lb Luca Burgazzoli
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: