You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Content-Type is missing from the request, Twirpy returns a 500 response code instead of gracefully handling the error.
Make any request without a Content-Type. This error will be raised.
Error: got non-twirp exception while processing request
Trace:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/twirp/asgi.py", line 62, in __call__
encoder, decoder = self._get_encoder_decoder(endpoint, headers)
File "/usr/local/lib/python3.10/site-packages/twirp/base.py", line 104, in _get_encoder_decoder
message="unexpected Content-Type: " + ctype
TypeError: can only concatenate str (not "NoneType") to str
See the code below. ctype = headers.get('content-type', None) sets ctype to None then attempts to concatenate the None type to a string in message="unexpected Content-Type: " + ctype while building the BadRoute error.
If Content-Type is missing from the request, Twirpy returns a 500 response code instead of gracefully handling the error.
Make any request without a Content-Type. This error will be raised.
Error:
got non-twirp exception while processing request
Trace:
See the code below.
ctype = headers.get('content-type', None)
setsctype
toNone
then attempts to concatenate the None type to a string inmessage="unexpected Content-Type: " + ctype
while building the BadRoute error.twirpy/twirp/base.py
Lines 93 to 106 in 6940030
The text was updated successfully, but these errors were encountered: