Handle 408 HTTP status code (request timeout)

Fix #743
This commit is contained in:
Julien Duponchelle committed 2016-10-27 15:32:07 +02:00
1 parent 620de3ff25
commit eff23eefe9
1 file changed
+2
+2
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))