The dead letter channel does not influence the response. From the Camel doc:
The Dead Letter Channel will redeliver at most 6 times using 1 second delay, and if the exchange failed it will be logged at ERROR level.
By the way, you didn't properly define a dead letter channel in the error handler. It should be:
errorHandler(deadLetterChannel("..."))
Did you try to set throwExceptionOnFailure
parameter to true
? From the Camel doc:
Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code.