Skip to content

Commit 809d29c

Browse files
committed
make release
1 parent 34857fc commit 809d29c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/6/digging-deeper/error-handling.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ Client-safe errors are assumed to be something that:
2828

2929
Thus, they are typically not actionable for server developers.
3030

31+
However, you can choose to report client-safe errors by replacing `Nuwave\Lighthouse\Execution\ReportingErrorHandler`
32+
with `Nuwave\Lighthouse\Execution\AlwaysReportingErrorHandler` in the `lighthouse.php` config:
33+
34+
```diff
35+
'error_handlers' => [
36+
- Nuwave\Lighthouse\Execution\ReportingErrorHandler::class,
37+
+ Nuwave\Lighthouse\Execution\AlwaysReportingErrorHandler::class,
38+
],
39+
```
40+
41+
`Nuwave\Lighthouse\Execution\AlwaysReportingErrorHandler` reports all errors through the default Laravel exception handler, regardless of client-safety.
42+
3143
## Additional Error Information
3244

3345
The interface [`GraphQL\Error\ProvidesExtensions`](https://github.com/webonyx/graphql-php/blob/master/src/Error/ProvidesExtensions.php)

0 commit comments

Comments
 (0)