Skip to content

Commit e56723a

Browse files
author
Romulo Furtado
committed
fix(error) handle unicode exception message
1 parent f64b885 commit e56723a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

graphql/error/located_error.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ class GraphQLLocatedError(GraphQLError):
99

1010
def __init__(self, nodes, original_error=None):
1111
if original_error:
12-
message = str(original_error)
12+
message = (
13+
original_error.message.encode('utf-8')
14+
if isinstance(original_error.message, unicode)
15+
else str(original_error)
16+
)
17+
1318
else:
1419
message = 'An unknown error occurred.'
1520

0 commit comments

Comments
 (0)