Skip to content
Myr

Merge pull request #2648 from msabramo/display_url_for_exceptions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Display URL as part of HTTP error messages

authored by Ian Cordasco · committed by Ian Cordasco · parents 9bbab33, e3bdec5 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/models.py+2 added-2 removed
826 unmodified lines
827828 http_error_msg = ''829830 if 400 <= self.status_code < 500:831 http_error_msg = '%s Client Error: %s' % (self.status_code, self.reason)831 http_error_msg = '%s Client Error: %s for url: %s' % (self.status_code, self.reason, self.url)832833 elif 500 <= self.status_code < 600:834 http_error_msg = '%s Server Error: %s' % (self.status_code, self.reason)834 http_error_msg = '%s Server Error: %s for url: %s' % (self.status_code, self.reason, self.url)835836 if http_error_msg:837 raise HTTPError(http_error_msg, response=self)838
10 unmodified lines