Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Adding more helpful '!=200' message for dud path. #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django_medusa/renderers/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _disk_render_path(args):

resp = client.get(path)
if resp.status_code != 200:
raise Exception
raise Exception("Path %s did not return status 200" % path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The improved message could include the actual resp.status_code too, which might be useful for figuring out which part of the callable stopped a success response being returned.

if needs_ext:
mime = resp['Content-Type']
mime = mime.split(';', 1)[0]
Expand Down