Throw original error in sendMsg method

Replaces the re-throwing of a new Error with the original error object in the sendMsg method, preserving the original error stack and type for better debugging.
This commit is contained in:
手瓜一十雪 2025-11-01 22:32:26 +08:00
parent 62fa407530
commit b30fc0c863

View File

@ -1182,7 +1182,7 @@ export class OneBotMsgApi {
}, returnMsg.msgId);
return returnMsg;
} catch (error) {
throw new Error((error as Error).message);
throw error;
} finally {
cleanTaskQueue.addFiles(deleteAfterSentFiles, timeout);
// setTimeout(async () => {