Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #155 from matrixgpt/feature/error-code
Browse files Browse the repository at this point in the history
add error code to response
  • Loading branch information
bertybuttface authored Apr 14, 2023
2 parents 8f9eea4 + 6576fc3 commit 31126af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default class CommandHandler {
const result = await sendChatGPTMessage(this.chatGPT, await bodyWithoutPrefix, storedConversation)
.catch((error) => {
LogService.error(`OpenAI-API Error: ${error}`);
sendError(this.client, "The bot has encountered an error, please contact your administrator.", roomId, event.event_id);
sendError(this.client, `The bot has encountered an error, please contact your administrator (Error code ${error.status || "Unknown"}).`, roomId, event.event_id);
});
await Promise.all([
this.client.setTyping(roomId, false, 500),
Expand Down

0 comments on commit 31126af

Please sign in to comment.