Skip to content

Commit 2ff7329

Browse files
Zhun XuZhun Xu
authored andcommitted
add status to response
1 parent 4fc71c2 commit 2ff7329

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/seldon_core/wrapper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ def Predict():
4040
requestJson = get_request()
4141
logger.debug("REST Request: %s", request)
4242
response = seldon_core.seldon_methods.predict(user_model, requestJson)
43+
json_response = jsonify(response)
44+
if response.status is not None and response.status.code is not None:
45+
json_response.status_code = response.status.code
46+
4347
logger.debug("REST Response: %s", response)
44-
return jsonify(response)
48+
return json_response
4549

4650
@app.route("/send-feedback", methods=["GET", "POST"])
4751
@app.route("/api/v0.1/feedback", methods=["POST"])

0 commit comments

Comments
 (0)