-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Using VS 2022
The following response from OpenAI triggers a fatal but silent throw.
Errors would be better handled by setting an error flag and storing the output for user handling or allowing user-definition of an error handling callback (or at the very least reporting the issue before crashing).
Response is:
{
"error": {
"code": null,
"message": "You exceeded your current quota, please check your plan and billing details.",
"param": null,
"type": "insufficient_quota"
}
}
void trigger_error(const std::string& msg) {
// if (throw_exception_) {
// throw std::runtime_error(msg);
// }
// else {
std::cerr << "[OpenAI] error. Reason: " << msg << '\n';
// }
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request