diff --git a/platformics/graphql_api/core/error_handler.py b/platformics/graphql_api/core/error_handler.py index a610699..c4b8933 100644 --- a/platformics/graphql_api/core/error_handler.py +++ b/platformics/graphql_api/core/error_handler.py @@ -45,6 +45,11 @@ class DefaultExceptionHandler(ExceptionHandler): error_message: str = "Unexpected error." def convert_exception(self, err: Any) -> list[GraphQLError]: + try: + if isinstance(err, GraphQLError) and not err.original_error: + return [err] + except AttributeError: + pass return [ GraphQLError( message=self.error_message,