Skip to content

Commit fc18938

Browse files
author
Test
committed
fix __hash__() for HttpQueryError
1 parent feabce7 commit fc18938

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graphql_server/error.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import json
2+
3+
14
class HttpQueryError(Exception):
25
def __init__(self, status_code, message=None, is_graphql_error=False, headers=None):
36
self.status_code = status_code
@@ -13,4 +16,4 @@ def __eq__(self, other):
1316
other.headers == self.headers
1417

1518
def __hash__(self):
16-
return hash((self.status_code, self.message, self.headers))
19+
return hash((self.status_code, self.message, json.dumps(self.headers)))

0 commit comments

Comments
 (0)