Browse Source

fix: improve error logging in audit API for bad requests

Manuel 9 months ago
parent
commit
5aaac49783
1 changed files with 2 additions and 1 deletions
  1. 2 1
      routes/api_routes.py

+ 2 - 1
routes/api_routes.py

@@ -158,7 +158,8 @@ def api_run_audit():
         return jsonify(result)
 
     except BadRequest as e:
-        return jsonify({"error": str(e)}), 400
+        logger.warning(f"Bad request in audit API: {e}")
+        return jsonify({"error": "Bad request"}), 400
 
     except ValueError:
         return jsonify({"error": "Invalid numeric value"}), 400