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

Salesforce Login exception: the error code is not reported properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.19.0
    • camel-salesforce
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: