Errors in strawberry
Strawberry has built-in errors for when something goes wrong with the creation and usage of the schema.
It also provides a custom exception handler for improving how errors are printed and to make it easier to find the exception source, for example the following code:
will show the following exception on the command line:
These errors are only enabled when rich
and libcst
are installed. You can
install Strawberry with errors enabled by running:
If you want to disable the errors you can do so by setting the
STRAWBERRY_DISABLE_RICH_ERRORS
environment variable to 1
.