MaskErrors
This extension hides error messages from the client to prevent exposing sensitive details. By default it masks all errors raised in any field resolver.
Usage example:
API reference:
should_mask_error: Callable[[GraphQLError], bool] = default_should_mask_error
Predicate function to check if a GraphQLError should be masked or not. Use the
original_error
attribute to access the original error that was raised in the
resolver.
The default_should_mask_error
function always returns True
.
error_message: str = "Unexpected error."
The error message to display to the client when there is an error.