我这里遇到的 bad request
一般是这样:
其中 请求数据过大,读取超时
一般就是因为上传超时了
请求数据过大,读取超时
图片过大,没有完整上传成功
{ response: { data: { message: '请求数据过大,读取超时', code: 10998, err_code: 40011024, trace_id: '6b21275a44c51d2cfeb2733bae86160a' }, url: 'https://api.sgroup.qq.com/channels/***********/messages', status: 400, statusText: 'Bad Request', headers: Headers { date: 'Wed, 05 Feb 2025 06:37:41 GMT', 'content-type': 'application/json', 'content-length': '126', connection: 'keep-alive', 'x-tps-trace-id': '6b21275a44c51d2cfeb2733bae86160a', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, OPTIONS', 'access-control-allow-headers': 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,authorization' } }, code: undefined, [Symbol(cordis.http.error)]: true }
消息发送失败,机器人非群成员
{ response: { data: { message: '消息发送失败,机器人非群成员', code: 11293, err_code: 40034101, trace_id: 'b9fd6e2c5c5a03379dfd91fb1a5e58fd' }, url: 'https://api.sgroup.qq.com/v2/groups/9DC3F2E1560249FDF8DED212A46FA42C/messages', status: 400, statusText: 'Bad Request', headers: Headers { date: 'Tue, 11 Feb 2025 09:20:08 GMT', 'content-type': 'application/json', 'content-length': '135', connection: 'keep-alive', 'x-tps-trace-id': 'b9fd6e2c5c5a03379dfd91fb1a5e58fd', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, OPTIONS', 'access-control-allow-headers': 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,authorization' } }, code: undefined, [Symbol(cordis.http.error)]: true }
在我这里,Internal Server Error
更为常见
msg repeated
消息重复了
{ response: { data: { code: 1100000, message: 'msg repeated', err_code: 1100000, trace_id: 'bc04a502f505e1187c7de8344ec60fbd' }, url: 'https://api.sgroup.qq.com/channels/***********/messages', status: 500, statusText: 'Internal Server Error', headers: Headers { date: 'Wed, 05 Feb 2025 07:09:30 GMT', 'content-type': 'application/json', 'content-length': '106', connection: 'keep-alive', 'x-content-type-options': 'nosniff', 'x-tps-trace-id': 'bc04a502f505e1187c7de8344ec60fbd', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, OPTIONS', 'access-control-allow-headers': 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,authorization' } }, code: undefined, [Symbol(cordis.http.error)]: true }
type:business, code:4, msg:null
发消息频率太高了?
{ response: { data: { code: 2000000, message: 'type:business, code:4, msg:null', err_code: 2000000, trace_id: '5193fb02c725a995ba40efa01af18362' }, url: 'https://api.sgroup.qq.com/channels/***********/messages', status: 500, statusText: 'Internal Server Error', headers: Headers { date: 'Wed, 05 Feb 2025 07:08:51 GMT', 'content-type': 'application/json', 'content-length': '125', connection: 'keep-alive', 'x-content-type-options': 'nosniff', 'x-tps-trace-id': '5193fb02c725a995ba40efa01af18362', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, OPTIONS', 'access-control-allow-headers': 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,authorization' } }, code: undefined, [Symbol(cordis.http.error)]: true }
file size exceeded
图片文件过大,可能是抽到了10MB这样的图?
{ response: { data: { message: 'file size exceeded', code: 304020, err_code: 304020, trace_id: '6b48b4a1c84ad594f7b8ae1817acbe2a' }, url: 'https://api.sgroup.qq.com/channels/************/messages', status: 500, statusText: 'Internal Server Error', headers: Headers { date: 'Fri, 07 Feb 2025 17:43:14 GMT', 'content-type': 'application/json', 'content-length': '110', connection: 'keep-alive', 'x-tps-trace-id': '6b48b4a1c84ad594f7b8ae1817acbe2a', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, OPTIONS', 'access-control-allow-headers': 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,authorization' } }, code: undefined, [Symbol(cordis.http.error)]: true }