Skip to content

Commit

Permalink
Handle 404 status in OAI
Browse files Browse the repository at this point in the history
  • Loading branch information
Cohee1207 committed Apr 10, 2023
1 parent f2d7f74 commit 9127c69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,10 @@ app.post("/getstatus_openai", jsonParser, function (request, response_getstatus_
console.log('Access Token is incorrect.');
response_getstatus_openai.send({ error: true });
}
if (response.statusCode == 404) {
console.log('Endpoint not found.');
response_getstatus_openai.send({ error: true });
}
if (response.statusCode == 500 || response.statusCode == 501 || response.statusCode == 501 || response.statusCode == 503 || response.statusCode == 507) {
console.log(data);
response_getstatus_openai.send({ error: true });
Expand Down

0 comments on commit 9127c69

Please sign in to comment.