-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add error handling for OpenAI organization verification error #9969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Detect OpenAI organization verification error in analyzeError - Show help documentation link instead of GitHub issue for this error - Hide GitHub issue button when helpUrl is provided - Add comprehensive tests for the new error handling Generated with [Continue](https://continue.dev) Co-authored-by: dallin <[email protected]> Co-Authored-By: Continue <[email protected]>
|
|
✅ Review Complete Code Review Summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="gui/src/util/errorAnalysis.test.ts">
<violation number="1" location="gui/src/util/errorAnalysis.test.ts:546">
P2: Test expects OpenAI verification handling even though the error message lacks "openai", which contradicts the detection logic requiring that substring and will fail.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| it("should handle OpenAI organization verification error", () => { | ||
| const error = new Error( | ||
| 'HTTP 400 Bad Request\n\n{"message":"Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Test expects OpenAI verification handling even though the error message lacks "openai", which contradicts the detection logic requiring that substring and will fail.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At gui/src/util/errorAnalysis.test.ts, line 546:
<comment>Test expects OpenAI verification handling even though the error message lacks "openai", which contradicts the detection logic requiring that substring and will fail.</comment>
<file context>
@@ -530,6 +540,47 @@ describe("errorAnalysis", () => {
+
+ it("should handle OpenAI organization verification error", () => {
+ const error = new Error(
+ 'HTTP 400 Bad Request\n\n{"message":"Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}',
+ );
+ const selectedModel = {
</file context>
| 'HTTP 400 Bad Request\n\n{"message":"Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}', | |
| 'HTTP 400 Bad Request\n\n{"message":"OpenAI: Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}', |
Summary
This PR adds custom error handling for the OpenAI organization verification error that occurs when an organization hasn't been verified to use reasoning summaries.
Changes
Error Detection
The error is detected when the message contains both:
When detected, the error handler:
UI Changes
Instead of showing the "Open GitHub issue" button, users will see a "View help documentation" button that directs them to OpenAI's help article about organization verification.
Testing
Added unit tests covering:
Continue Tasks:▶️ 2 queued — View all
Summary by cubic
Handles OpenAI organization verification errors for reasoning summaries, and routes users to the correct help docs instead of opening GitHub issues. Updates error analysis and the StreamError UI to make this clearer.
Written for commit c9f86e5. Summary will update on new commits.