Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix apq status #948

Closed
wants to merge 1 commit into from
Closed

fix apq status #948

wants to merge 1 commit into from

Conversation

vvakame
Copy link
Collaborator

@vvakame vvakame commented Nov 29, 2019

I don't have good solutions... 🤔

so, APQ works in CreateOperationContext method.
and handler exec w.WriteHeader(http.StatusUnprocessableEntity) when its returns error.
but It's unexpected behavior in client.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@vvakame vvakame requested a review from vektah November 29, 2019 04:12
@99designs 99designs deleted a comment from render bot Nov 29, 2019
@99designs 99designs deleted a comment from render bot Nov 29, 2019
@vvakame
Copy link
Collaborator Author

vvakame commented Nov 29, 2019

It doesn't seems right to always return 200... 🤔

@vvakame vvakame closed this Dec 19, 2019
@vvakame vvakame deleted the fix-apq branch December 19, 2019 07:08
@vvakame
Copy link
Collaborator Author

vvakame commented Dec 19, 2019

We needs some status code modifying process from middleware...
I'll try to implement it.

@vektah
Copy link
Collaborator

vektah commented Jan 6, 2020

Sorry its taken so long to get back to this, went on holiday 🍹.

Maybe its best to keep it simple? We dont need to reimplement error presenter, just a way for handlers during early request processing to set the status code right?

what about

interface HttpStatusCoder {
   error
   HttpStatusCode() int
}

?

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

Successfully merging this pull request may close these issues.

2 participants