codegist/crest — Issue #9: error code
Author: priedl
Created: 2011-10-19 10:59:04+00:00
State: open

hi,

i have an issue concerning differences between version 1.0.1 and 2.0.0 of crest. in version 1.0.1 the ErrorHandler interface had a ResponseContext object as parameter where you could get all information from the originating request and the resulting response (including status code) from. in version 2.0.0 the parameters for ErrorHandler are the request and an exception. all information about the request is readily available but the exception only contains the message of the status code (e.g. "Unauthorized" for 401). is there any way to get the status code in the current version? if there is not, i would suggest to either add the response to the parameters or define a custom exception that at least contains the status code of the response.

regards,
peter