We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 64eaec3 + 4482db5 commit bdab36bCopy full SHA for bdab36b
1 file changed
sendgrid/sendgrid.py
@@ -109,9 +109,9 @@ def _raising_send(self, message):
109
try:
110
return self._make_request(message)
111
except HTTPError as e:
112
- if e.code in range(400, 500):
+ if 400 <= e.code < 500:
113
raise SendGridClientError(e.code, e.read())
114
- elif e.code in range(500, 600):
+ elif 500 <= e.code < 600:
115
raise SendGridServerError(e.code, e.read())
116
else:
117
assert False
0 commit comments