Skip to content

Commit

Permalink
Merge pull request #383 from rgbkrk/diet
Browse files Browse the repository at this point in the history
Slim down the error body
  • Loading branch information
minrk committed Dec 18, 2014
2 parents b34d3e5 + 5131c61 commit 1685558
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nbviewer/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ def reraise_client_error(self, exc):
else:
msg = str_exc

app_log.warn("Fetching %s failed with %s. Body=%s", url, msg, escape(body))
slim_body = body[:300].encode('string_escape')

app_log.warn("Fetching %s failed with %s. Body=%s", url, msg, slim_body)
if exc.code == 599:
if isinstance(exc, CurlError):
en = getattr(exc, 'errno', -1)
Expand Down

0 comments on commit 1685558

Please sign in to comment.