Open vladopandzic opened 7 years ago
You can override that method and use CreateErrorResponse instead. Both CreateResponse and CreateErrorResponse have a return type of HttpResponseMessage.
@vladop Are there specific side effects that you are expecting CreateErrorResponse to provide? What are some differences in the HttpResponseMessage that you expect to see?
At the end of message handler you call Request.CreateResponse. Is it possible that you actually use Request.CreateErrorResponse, or make it at least configurable. This is important because I use other message handlers made by myself and they treat your response message as actual data (instead of threating them as errors). I know this is small change in code but probably breaking one, but making strategy about returning response configurable would be great