mirror of
https://github.com/matrixgpt/matrix-chatgpt-bot.git
synced 2024-10-01 01:25:41 -04:00
Merge pull request #155 from matrixgpt/feature/error-code
add error code to response
This commit is contained in:
commit
31126af68f
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user