Skip to content

Conversation

@vitalii-kyktov
Copy link
Contributor

@vitalii-kyktov vitalii-kyktov commented Sep 12, 2025

Q A
Branch? main
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #528
License MIT

When OpenAI API returns 401 (authentication error), users now get a clear AuthenticationException with the actual API error message instead of the confusing "Response does not contain choices" error.

Changes:

  • Add AuthenticationException class for API authentication failures
  • Update OpenAI ResultConverter to check HTTP 401 status before processing
  • Add test coverage for authentication error scenarios
When OpenAI API returns 401 (authentication error), users now get a clear AuthenticationException with the actual API error message instead of the confusing "Response does not contain choices" error. Changes: - Add AuthenticationException class for API authentication failures - Update OpenAI ResultConverter to check HTTP 401 status before processing - Add test coverage for authentication error scenarios Co-authored-by: Dmytro Liashko <dmlyashko@gmail.com> Fixes symfony#528
@carsonbot carsonbot added Status: Needs Review Platform Issues & PRs about the AI Platform component labels Sep 12, 2025
vitality added 2 commits September 12, 2025 13:10
Remove unnecessary JSON fields from mock response to focus on the essential error message extraction logic.
…Exception Keep the class clean without partial author information until the full implementation is complete.
@vitalii-kyktov vitalii-kyktov force-pushed the openai-authentication-exception branch from b3ecf66 to 193b56a Compare September 12, 2025 11:10
@chr-hertel
Copy link
Member

Thank you @vitalii-kyktov.

@chr-hertel chr-hertel merged commit 6bfcaa6 into symfony:main Sep 12, 2025
13 checks passed
@chr-hertel chr-hertel added the Hackathon 2025 This issue or pull request was part of the Symfony AI Hackathon 2025 label Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hackathon 2025 This issue or pull request was part of the Symfony AI Hackathon 2025 Platform Issues & PRs about the AI Platform component Status: Reviewed

3 participants