Catch timeout error in ajax proxy
This commit is contained in:
parent
7452681b31
commit
b5d0b50183
1 changed files with 2 additions and 0 deletions
|
@ -343,6 +343,8 @@ class AjaxProxy(View):
|
|||
return HttpResponseBadRequest("URL error")
|
||||
except InvalidURL:
|
||||
return HttpResponseBadRequest("Invalid URL")
|
||||
except TimeoutError:
|
||||
return HttpResponseBadRequest("Timeout")
|
||||
else:
|
||||
status_code = proxied_request.code
|
||||
mimetype = proxied_request.headers.get(
|
||||
|
|
Loading…
Reference in a new issue