Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Feb 14, 2022
1 parent 37316d0 commit 2da8447
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions irrd/server/graphql/tests/test_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ def test_error_formatter():
# Regular GraphQL error should always be passed
error = GraphQLError(message='error')
result = error_formatter(error)
assert result == {'message': 'error'}
assert result['message'] == 'error'

# If original_error is something else, hide except when in debug mode
error = GraphQLError(message='error', original_error=ValueError())
result = error_formatter(error)
assert result == {'message': 'Internal server error'}
assert result['message'] == 'Internal server error'

result = error_formatter(error, debug=True)
assert result == {'message': 'error',
'extensions': {'exception': None}}
assert result['message'] == 'error'
assert result['extensions'] == {'exception': None}

0 comments on commit 2da8447

Please sign in to comment.