Skip to content

Conversation

junaidbinfarooq
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Docs? yes
Issues Fix #528
License MIT

Changes proposed:

The PR aims to add the following:

  • Exceptions for 404 and 503
  • A generic HTTP error handler

@carsonbot carsonbot added Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review labels Sep 12, 2025
@carsonbot carsonbot changed the title [platform] Add generic exceptions [Platform] Add generic exceptions Sep 12, 2025
@junaidbinfarooq junaidbinfarooq force-pushed the feat/issue-528-add-generic-api-errors branch from fb02868 to 65af651 Compare September 12, 2025 20:22
@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
- Adds exceptions for 404 and 503
- Adds a generic http error handler
@junaidbinfarooq junaidbinfarooq force-pushed the feat/issue-528-add-generic-api-errors branch 3 times, most recently from 282f91c to 59746d1 Compare September 15, 2025 12:47
- Adds logic, to handle rate limit exception, to the handler
@junaidbinfarooq junaidbinfarooq force-pushed the feat/issue-528-add-generic-api-errors branch from 59746d1 to d5f9325 Compare September 17, 2025 17:06
@junaidbinfarooq
Copy link
Contributor Author

@chr-hertel @OskarStark
Please review this and let me know what you think.

chr-hertel added a commit that referenced this pull request Sep 28, 2025
…oesteve)

This PR was squashed before being merged into the main branch.

Discussion
----------

[Platform][OpenAI] Improve error reporting for Bad Request

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        | Fix #528
| License       | MIT

I've noted an interesting initiative at #574 to handle non-valid response codes in a more structured and scalable way. This approach makes sense to me, but it may require further reflection. With this PR, I aim to contribute a humble and specific use case for OpenAI, along with an Exception class that could be reused for the other bridges.

Commits
-------

c39bbbf [Platform][OpenAI] Improve error reporting for Bad Request
symfony-splitter pushed a commit to symfony/ai-platform that referenced this pull request Sep 28, 2025
…oesteve)

This PR was squashed before being merged into the main branch.

Discussion
----------

[Platform][OpenAI] Improve error reporting for Bad Request

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        | Fix #528
| License       | MIT

I've noted an interesting initiative at symfony/ai#574 to handle non-valid response codes in a more structured and scalable way. This approach makes sense to me, but it may require further reflection. With this PR, I aim to contribute a humble and specific use case for OpenAI, along with an Exception class that could be reused for the other bridges.

Commits
-------

c39bbbf4 [Platform][OpenAI] Improve error reporting for Bad Request
@junaidbinfarooq
Copy link
Contributor Author

@chr-hertel @OskarStark
Could you have a look?

devmatt000 pushed a commit to devmatt000/dev_ai that referenced this pull request Oct 2, 2025
…oesteve)

This PR was squashed before being merged into the main branch.

Discussion
----------

[Platform][OpenAI] Improve error reporting for Bad Request

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        | Fix #528
| License       | MIT

I've noted an interesting initiative at symfony/ai#574 to handle non-valid response codes in a more structured and scalable way. This approach makes sense to me, but it may require further reflection. With this PR, I aim to contribute a humble and specific use case for OpenAI, along with an Exception class that could be reused for the other bridges.

Commits
-------

c39bbbf4 [Platform][OpenAI] Improve error reporting for Bad Request
@chr-hertel
Copy link
Member

@junaidbinfarooq I'm currently not really convinced that it should be the role of result converters to handle this stuff. see #646 #136 and #167

please don't spend more time here - not closing for now, since we might come back to this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Hackathon 2025 This issue or pull request was part of the Symfony AI Hackathon 2025 Platform Issues & PRs about the AI Platform component Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Platform] Expose API errors for better Developer Experience
5 participants