You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jeremy Ross (Jira)" <ji...@apache.org> on 2021/12/19 18:48:00 UTC

[jira] [Commented] (CAMEL-13181) camel-salesforce - rest exception parsing produces useless messages

    [ https://issues.apache.org/jira/browse/CAMEL-13181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462265#comment-17462265 ] 

Jeremy Ross commented on CAMEL-13181:
-------------------------------------

I think this issue is resolved. The parsed rest errors are included in the returned `SalesforceException` [here|https://github.com/apache/camel/blob/64a3adfdb9cab8814ca298b137f3d8e151440dff/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java#L107-L110]. And if we fail to parse errors from the response, we include the raw response InputStream in the exception also. 

> camel-salesforce - rest exception parsing produces useless messages
> -------------------------------------------------------------------
>
>                 Key: CAMEL-13181
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13181
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-salesforce
>            Reporter: Jesse Sightler
>            Priority: Minor
>
> In the case of serialization failures, createRestException swallows the exception and logs the inputstream object itself:
>  
> [https://github.com/apache/camel/blob/master/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java#L119]
>  
> This does not tend to produce an error message, as the response is essentially always something like "ByteArrayInputStream@\{hashcode}". Perhaps it could try to return the raw contents if it is short and json?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)