Skip to content

Prevent reporting exceptions caused by user input. #1661

Answered by spawnia
daniel-de-wit asked this question in Q&A
Discussion options

You must be logged in to vote

Are you using Lighthouse?

Lighthouse will catch exceptions thrown during the execution of a query and return them as part of the response.

The error handler Nuwave\Lighthouse\Execution\ReportingErrorHandler is included in the default configuration
and reports non-client-safe errors through the default Laravel exception handler.

Client-safe errors are assumed to be something that:

  • a client can understand and handle
  • were caused by client misuse, e.g. wrong syntax, authentication, validation
    Thus, they are typically not actionable for server developers.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@daniel-de-wit
Comment options

Answer selected by daniel-de-wit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants