1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Handle 408 HTTP status code (request timeout)

Fix #743
This commit is contained in:
Julien Duponchelle 2016-10-27 15:32:07 +02:00
parent 620de3ff25
commit eff23eefe9
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -484,6 +484,8 @@ class Compute:
raise aiohttp.web.HTTPForbidden(text=msg)
elif response.status == 404:
raise aiohttp.web.HTTPNotFound(text="{} {} not found".format(method, path))
elif response.status == 408:
raise aiohttp.web.HTTPRequestTimeout(text="{} {} request timeout".format(method, path))
elif response.status == 409:
try:
raise ComputeConflict(json.loads(body))