[
https://issues.apache.org/jira/browse/CAMEL-13181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17068504#comment-17068504
]
Zoran Regvart commented on CAMEL-13181:
---------------------------------------
[~Soann Dewasme] I think that's a good idea. I think what we can improve here
is twofold: have a meaningful error text displayed instead of the
{{InputStream::toString}} and have a parameter to display the full/raw errors
from Salesforce. First might require parsing the error responses from
Salesforce, for the second improvement perhaps a {{rawErrors}} (we already have
{{rawPayload}} can that be used for errors also?) would be a good property
name. Not sure if we should consider capping the number of characters/bytes in
error output or redacting some of the output so we don't output passwords or
similar sensitive data.
> 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.3.4#803005)