Skip to content

Commit

Permalink
more informative exception
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Nov 13, 2013
1 parent 0f5c26a commit e563333
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aiohttp/client.py
Expand Up @@ -636,7 +636,8 @@ def write_bytes(self, request, is_stream):
request.write(result)
value = None
else:
raise ValueError('Bytes object is expected.')
raise ValueError(
'Bytes object is expected, got: %s.' % type(result))
else:
if isinstance(self.body, bytes):
self.body = (self.body,)
Expand Down

0 comments on commit e563333

Please sign in to comment.