pull/244/head^2^2
xiaojunnuo 2024-11-15 23:29:04 +08:00
parent 4a2f7ebf87
commit 0ca61b4d99
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,10 @@ const res = await ctx.http.request({
key : certKey
}
})
if(!res || res.code !== 0){
//抛异常才能让任务失败
throw new Error("上传失败")
}
//不能用console.log需要用ctx.logger 才能把日志打印在ui上
ctx.logger.info("上传成功",res.data)
@ -79,3 +83,4 @@ type CustomScriptPlugin = {
}
```