Skip to content

Conversation

@Chan9390
Copy link
Contributor

@Chan9390 Chan9390 commented Nov 4, 2025

Context

If user adds an invalid API key, the entire JSON error message is returned.

Celery task output:

image

Rendering the same error message on frontend looks as follows:

image

(As highlighted in the PR review - #8925 (comment))

Description

This PR returns just the human readable error message if the message exists in the Exception.

Steps to review

  1. Create an OpenAI provider with incorrect API key (sk-xxxxxxx) using the new lighthouse endpoint /api/v1/lighthouse/providers
  2. The celery task should return just the error message instead of the entire JSON

Example:

image

Checklist

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Chan9390 Chan9390 requested a review from a team as a code owner November 4, 2025 15:37
@github-actions github-actions bot added component/api community Opened by the Community labels Nov 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

⚠️ Changes detected in the following folders without a corresponding update to the CHANGELOG.md:

  • api

Please add an entry to the corresponding CHANGELOG.md file to maintain a clear history of changes.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@Chan9390
Copy link
Contributor Author

Chan9390 commented Nov 4, 2025

No changelog needed as multi-llm provider support is not rolled out in any release.

@Chan9390 Chan9390 added the no-changelog Skip including change in changelog/release notes label Nov 4, 2025
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.22%. Comparing base (6014951) to head (0302c16).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9165       +/-   ##
===========================================
+ Coverage   69.31%   94.22%   +24.90%     
===========================================
  Files          84      147       +63     
  Lines        5961    18644    +12683     
===========================================
+ Hits         4132    17567    +13435     
+ Misses       1829     1077      -752     
Flag Coverage Δ
api 94.22% <73.33%> (?)
prowler-py3.10-iac ?
prowler-py3.10-lib ?
prowler-py3.11-iac ?
prowler-py3.11-lib ?
prowler-py3.12-iac ?
prowler-py3.12-lib ?
prowler-py3.9-iac ?
prowler-py3.9-lib ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler ∅ <ø> (∅)
api 94.22% <73.33%> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

🔒 Container Security Scan

Image: prowler-api:fea82aa
Last scan: 2025-11-04 15:46:11 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 4
Total 4

3 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

@andoniaf andoniaf removed the community Opened by the Community label Nov 11, 2025
Copy link
Contributor

@rakan-pro rakan-pro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! note that change log should be adjusted accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/api no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants