Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit 3a4ed23

Browse files
authored
Explicit response codes
1 parent 63e2254 commit 3a4ed23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def clickhouse():
5858

5959
result, errmsg = chdb_query_with_errmsg(query, format)
6060
if len(errmsg) == 0:
61-
return result
62-
return errmsg
61+
return result, 200
62+
return errmsg, 400
6363

6464
@app.route('/', methods=["POST"])
6565
@auth.login_required
@@ -76,8 +76,8 @@ def play():
7676

7777
result, errmsg = chdb_query_with_errmsg(query, format)
7878
if len(errmsg) == 0:
79-
return result
80-
return errmsg
79+
return result, 200
80+
return errmsg, 400
8181

8282

8383
@app.route('/play', methods=["GET"])

0 commit comments

Comments
 (0)