jeremyross opened a new pull request #6549:
URL: https://github.com/apache/camel/pull/6549


   In case of non-2xx responses to Apex REST requests, preserve the
   response content since it won't necessarily be in the standard
   salesforce exception format.
   
   Is it a terrible idea to return an InputStream in the Exception? Very 
possible that it would only get closed when the exception gets GC'd. I believe 
it's always a ByteArrayInputStream, so at least no file/socket handles are 
involved. I'd like to avoid returning the response content as the message body. 
Since this is for exceptional situations, I think it makes sense to use an 
exception and preserve the `in` message body for logging/debugging capabilities.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to