diff options
author | Alexander_Kabui | 2024-01-17 19:16:27 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-01-17 19:16:27 +0300 |
commit | 51c079116b2e81b49e1d1e8aa82f9aba74442ff5 (patch) | |
tree | fa21a7d1835cd0976b1c6cb3f35378a60db53736 | |
parent | 6affb9eee7ec1611863da4c9126d9b25480d6d9d (diff) | |
download | genenetwork3-51c079116b2e81b49e1d1e8aa82f9aba74442ff5.tar.gz |
Enhance error response message in API endpoint
-rw-r--r-- | gn3/api/llm.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py index 9c277c1..3dd75fa 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -30,7 +30,7 @@ def gnqa(): }) except Exception as error: - return jsonify({"query": query, "error": "Internal server error"}), 500 + return jsonify({"query": query, "error": f"Request failed-{str(error)}"}), 500 @GnQNA.route("/rating/<task_id>/<doc_id>/<int:rating>", methods=["POST"]) @@ -39,7 +39,6 @@ def rating(task_id, doc_id, rating): results = rate_document(task_id, doc_id, rating, current_app.config.get("FAHAMU_AUTH_TOKEN")) - return jsonify({ **results, "doc_id": doc_id, |