[ https://issues.apache.org/jira/browse/CAMEL-13180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17460951#comment-17460951 ]
Jesse Sightler commented on CAMEL-13180: ---------------------------------------- In you apex class, set your body like this: "RestContext.response.responseBody = Blob.valueOf(JSON.serialize(responseBody))" – responseBody is just a Map. Set the status code with RestContext.response.statusCode = 500 > camel-salesforce - Apex calls could support more flexible response parsing > -------------------------------------------------------------------------- > > Key: CAMEL-13180 > URL: https://issues.apache.org/jira/browse/CAMEL-13180 > Project: Camel > Issue Type: New Feature > Components: camel-salesforce > Reporter: Jesse Sightler > Priority: Major > Fix For: 3.x > > > The current approach requires following a very strict format for error codes > other than 2xx. This isn't necessarily the case, though, for custom apex > classes. > Ideally, it would be possible to (optionally) handle the parsing in the camel > route itself. -- This message was sent by Atlassian Jira (v8.20.1#820001)