Skip to content

Commit 015ceee

Browse files
committed
respond to timeouts better
Signed-off-by: Praneeth Bedapudi <[email protected]>
1 parent f528c88 commit 015ceee

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

fastdeploy/_rest.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,14 @@ def on_post(self, req, resp):
148148
) = self._response_handler.register_request_and_wait_for_response(
149149
unique_id, is_compressed, input_type, client_timeout
150150
)
151-
resp.status = falcon.HTTP_200 if success else falcon.HTTP_400
151+
if success:
152+
resp.status = falcon.HTTP_200
153+
else:
154+
if response["reason"] == "timeout":
155+
resp.status = falcon.HTTP_408
156+
else:
157+
resp.status = falcon.HTTP_500
158+
152159
if input_type == "json":
153160
resp.media = response
154161
else:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
AUTHOR = "BEDAPUDI PRANEETH"
2020
REQUIRES_PYTHON = ">=3.6.0"
21-
VERSION = "3.0.24"
21+
VERSION = "3.0.25"
2222

2323
# What packages are required for this module to be executed?
2424
REQUIRED = ["falcon", "liteindex==0.0.3.2.dev4", "zstandard", "gunicorn[gevent]", "msgpack"]

0 commit comments

Comments
 (0)