Skip to content

Commit 1e4de18

Browse files
committed
fix: improve error message formatting in fetch_upstream_json and chat_cre functions for better readability
1 parent 33c5777 commit 1e4de18

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

application/cmd/cre_main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,7 @@ def fetch_upstream_json(
653653
raise
654654
time.sleep(backoff_seconds)
655655

656-
raise RuntimeError(
657-
f"Unable to fetch upstream JSON from {url}: {last_exception}"
658-
)
656+
raise RuntimeError(f"Unable to fetch upstream JSON from {url}: {last_exception}")
659657

660658

661659
# DO NOT EXPOSE THIS TO THE COMMAND LINE OR REST API!

application/web/web_main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,9 @@ def chat_cre() -> Any:
13981398

13991399
if status_code == 429:
14001400
return (
1401-
jsonify({"error": "AI Service Error: rate-limited, please retry later"}),
1401+
jsonify(
1402+
{"error": "AI Service Error: rate-limited, please retry later"}
1403+
),
14021404
503,
14031405
)
14041406
return (

0 commit comments

Comments
 (0)