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

PersistedQueryCache functionality errors are invisible for handlers/middleware #908

Open
kjpopov opened this issue Oct 22, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@kjpopov
Copy link

kjpopov commented Oct 22, 2019

What happened?

Errors that comes from APQ (PersistedQueryCache) functionality are not catchable in the error presenter handler.ErrorPresenter and also any other kind of middleware e.g.handler.RequestMiddleware, handler.ResolverMiddleware.
The problem probably is that sendErrorf function writes directly to the http.ResponseWriter and does nothing with the context or whatever abstraction the handler.ErrorPresenter works with.

What did you expect?

Errors that come from APQ (PersistedQueryCache) e.g PersistedQueryNotFound, Unsupported persisted query version, provided sha does not match query, Must provide query string, are present in the context or in the error presenter handler.ErrorPresenter so they can be logged, traced, and/or CDN caching can be disabled for them via adding headers to the response.

Minimal graphql.schema and models to reproduce

any schema would work

versions

  • gqlgen version? v0.10.1
  • go version? go version go1.13.1 darwin/amd64 /but not related I think/
  • dep or go modules?
@stale
Copy link

stale bot commented Dec 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 21, 2019
@vvakame vvakame added enhancement New feature or request and removed stale labels Dec 25, 2019
@vvakame
Copy link
Collaborator

vvakame commented Dec 25, 2019

We have a big change in #885 .
I think this issue will be fixed in master / HEAD.

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

No branches or pull requests

2 participants