Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

CreateErrorResponse instead of CreateResponse #94

Open
vladopandzic opened this issue Mar 21, 2017 · 2 comments
Open

CreateErrorResponse instead of CreateResponse #94

vladopandzic opened this issue Mar 21, 2017 · 2 comments

Comments

@vladopandzic
Copy link

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

@jlkoneczny
Copy link

You can override that method and use CreateErrorResponse instead. Both CreateResponse and CreateErrorResponse have a return type of HttpResponseMessage.

@jboarman
Copy link

@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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants