Extend cases for OAI status code message pulling

This commit is contained in:
Cohee1207 2023-08-02 23:02:29 +03:00
parent 5a7c4947b3
commit 65a16970f4
1 changed files with 2 additions and 2 deletions

View File

@ -3296,11 +3296,11 @@ app.post("/generate_openai", jsonParser, function (request, response_generate_op
switch (error?.response?.status) {
case 402:
message = 'Credit limit reached';
message = error?.response?.data?.error?.message || 'Credit limit reached';
console.log(message);
break;
case 403:
message = 'API key disabled or exhausted';
message = error?.response?.data?.error?.message || 'API key disabled or exhausted';
console.log(message);
break;
case 451: