-
-
Notifications
You must be signed in to change notification settings - Fork 670
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Description
I just encountered a situation where we accidentally used a mismatching project ID and API key, then tried to execute calls locally. This caused errors where "output" or "data" could not be found in the response, which makes sense, given the actual body:
{
"error": {
"message": "OpenAI-Project header should match project for API key",
"type": "invalid_request_error",
"code": "mismatched_project",
"param": null
},
"status": 401
}The client should probably detect these cases and throw an error.
Steps To Reproduce
- Use a mismatching API key and unrelated project ID in the settings
- Try to perform any API call
OpenAI PHP Client Version
v0.18.0
PHP Version
8.5.1
Notes
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working