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
Launch workflow on the file at http://gehlenborg.com/wp-content/uploads/rfc/this-file-not-here.txt to trigger import of the file into the file store. Note that said file does not exist on the server.
Observed behavior
Since the file does not exist, the server will respond with a 404.
Refinery imports the error page sent by the server and logs the file as a successful import.
Expected behavior
Download of the file should fail and nothing should get imported.
Ideally, a warning should be displayed that the download failed.
The text was updated successfully, but these errors were encountered:
The following code example illustrates the problem. Without the response.raise_for_status() no exception will be raised.
importrequestsitem="http://httpbin.org/status/404"try:
response=requests.get(item, stream=True)
# the next line is required to trigger an exception on HTTP error codesresponse.raise_for_status()
exceptrequests.exceptions.HTTPErrorase:
print"Could not open URL '%s'", itemexceptrequests.exceptions.ConnectionErrorase:
print"Could not open URL '%s'. Reason: '%s'", item, e.reasonexceptValueErrorase:
print"Could not open URL '%s'. Reason: '%s'", item, e.messageprint"%s", response
Commit: 33de42c
Steps to reproduce
http://gehlenborg.com/wp-content/uploads/rfc/this-file-not-here.txt
to trigger import of the file into the file store. Note that said file does not exist on the server.Observed behavior
Expected behavior
The text was updated successfully, but these errors were encountered: