mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-18 20:30:08 +08:00
Improve error message for group notice image upload
Enhanced the error message when group notice image upload fails to include the error details from the upload API response.
This commit is contained in:
parent
457b072f0e
commit
93c140ed4e
@ -37,7 +37,7 @@ export class SendGroupNotice extends OneBotAction<Payload, null> {
|
||||
await checkFileExist(path, 5000);
|
||||
const ImageUploadResult = await this.core.apis.GroupApi.uploadGroupBulletinPic(payload.group_id.toString(), path);
|
||||
if (ImageUploadResult.errCode !== 0) {
|
||||
throw new Error(`群公告${payload.image}设置失败,图片上传失败`);
|
||||
throw new Error(`群公告${payload.image}设置失败,图片上传失败 , 错误信息:${ImageUploadResult.errMsg}`);
|
||||
}
|
||||
|
||||
unlink(path).catch(() => { });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user