Extend cases for OAI status code message pulling

This commit is contained in:
Cohee1207 2023-08-02 23:02:29 +03:00
parent 2a08e199d2
commit 143b4347c2
1 changed files with 2 additions and 2 deletions

View File

@ -3277,11 +3277,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: