Skip to content

Commit

Permalink
Added hint to the docs that errors can be rewritten. (#3655)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricio094 authored May 6, 2021
1 parent 1575660 commit 55b5660
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions website/src/docs/hotchocolate/v10/execution-engine/error-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,23 @@ SchemaBuilder.New()
IncludeExceptionDetails = true
});
```

## Customizable IErrors

Hot Chocolate provides some methods in Error to help add or remove messages,
codes, locations, paths and more, making error messages more readable

- `RemoveCode()`
- `RemoveException()`
- `RemoveExtension(string key)`
- `RemoveExtensions()`
- `RemoveLocations()`
- `RemovePath()`
- `SetExtension(string key, object? value)`
- `WithCode(string? code)`
- `WithException(Exception? exception)`
- `WithExtensions(IReadOnlyDictionary<string, object?> extensions)`
- `WithLocations(IReadOnlyList<Location>? locations)`
- `WithMessage(string message)`
- `WithPath(IReadOnlyList<object>? path)`
- `WithPath(Path? path)`

0 comments on commit 55b5660

Please sign in to comment.