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

Commit

Permalink
Explicit response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Nov 2, 2023
1 parent 63e2254 commit 3a4ed23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def clickhouse():

result, errmsg = chdb_query_with_errmsg(query, format)
if len(errmsg) == 0:
return result
return errmsg
return result, 200
return errmsg, 400

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

result, errmsg = chdb_query_with_errmsg(query, format)
if len(errmsg) == 0:
return result
return errmsg
return result, 200
return errmsg, 400


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

0 comments on commit 3a4ed23

Please sign in to comment.