Repository navigation
fix(perplexity-tools): sanitize unexpected search exception handling (#15633) - #23521
ducanh3005 wants to merge 1 commit into
Conversation
Payout & Verification Info (
|
|
Verdict: the production change is correct and nicely scoped — the failing "Backend unit suite" check is pre-existing main noise, not this diff; it just needs a rebase so the new test actually runs in CI. Per file:
On the failing check: all six backend unit shards abort at the pyright step in "Run authoritative backend unit contract" with 5 errors, every one in files this PR does not touch ( Security: this is the material dimension here — USER IMPACT: none — users see the same "Error: An unexpected error occurred while searching. Please try again later." message; only internal log formatting changes. Action items:
Leaving for human maintainer review before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Closes #15633
Failure-Class: none
Summary
Rebases and completes the unexpected search exception sanitization in
backend/utils/retrieval/tools/perplexity_tools.py:f"... {e}") in_perplexity_gateway_searchwith lazy%slogging oftype(e).__name__(exc_info=True) while returning the sanitized user-facing error message ("Error: An unexpected error occurred while searching. Please try again later.").backend/tests/unit/test_perplexity_tools_sanitization.pywithsetUpClass/tearDownClasssys.modulesrestoration so no module-scope stubs leak across test files.perplexity-tools-sanitization-testsin.github/checks-manifest.yaml.Verification
python3 backend/tests/unit/test_perplexity_tools_sanitization.py -v(2/2 passing)python3 backend/scripts/check_module_stub_pollution.py --files backend/tests/unit/test_perplexity_tools_sanitization.py(0 violations)