diff options
author | Alexander_Kabui | 2024-05-15 19:01:56 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-05-15 19:01:56 +0300 |
commit | d2b5a1c11f6e09ee13b72669068e326b8131f65c (patch) | |
tree | 3caabf5f64e2273f5fb4bdf1c2fda809dcaf8d4e /gn3/api | |
parent | 715241466e6426c2f3650e6cd9e0990078ad80f5 (diff) | |
download | genenetwork3-d2b5a1c11f6e09ee13b72669068e326b8131f65c.tar.gz |
Remove broad error handling.
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/llm.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py index 91779a5..08783db 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -1,6 +1,5 @@ """Api endpoints for gnqa""" from datetime import timedelta -from functools import wraps import json import sqlite3 from redis import Redis @@ -19,17 +18,6 @@ from gn3.auth import db GnQNA = Blueprint("GnQNA", __name__) -def handle_errors(func): - """general error handling decorator function""" - @wraps(func) - def decorated_function(*args, **kwargs): - try: - return func(*args, **kwargs) - except Exception as error: - return jsonify({"error": str(error)}), 500 - return decorated_function - - @GnQNA.route("/gnqna", methods=["POST"]) def gnqa(): """Main gnqa endpoint""" @@ -105,7 +93,6 @@ def rating(task_id): @GnQNA.route("/history/<query>", methods=["GET"]) @require_oauth("profile user") -@handle_errors def fetch_user_hist(query): """"Endpoint to fetch previos searches for User""" with (require_oauth.acquire("profile user") as the_token, @@ -118,7 +105,6 @@ def fetch_user_hist(query): @GnQNA.route("/historys/<query>", methods=["GET"]) -@handle_errors def fetch_users_hist_records(query): """method to fetch all users hist:note this is a test functionality to be replaced by fetch_user_hist @@ -133,7 +119,6 @@ def fetch_users_hist_records(query): @GnQNA.route("/get_hist_names", methods=["GET"]) -@handle_errors def fetch_prev_hist_ids(): """Test method for fetching history for Anony Users""" with (Redis.from_url(current_app.config["REDIS_URI"], |