core: send: detailed logs

This commit is contained in:
undefined committed 2021-05-22 12:06:55 +08:00
1 parent 0fcbcf4f1a
commit 437bfc5e6e
4 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -63,11 +63,11 @@ class ProxySendRequestHandler extends Handler {
let res = await superagent.post(`${url}d/${domainId}/problem/send`)
.send({ operation: 'info', token: tokenId })
.catch((e) => e);
if (res instanceof Error) throw new RemoteOnlineJudgeError(res.message);
if (res instanceof Error) throw new RemoteOnlineJudgeError(`[Post Target/Send/Info] ${res.message}`);
res = await superagent.post(`${endpoint}/problem/receive`).send({
operation: 'request', url: `${url}d/${domainId}/problem/send`, tokenId, expire,
}).catch((e) => e);
if (res instanceof Error) throw new RemoteOnlineJudgeError(res.message);
if (res instanceof Error) throw new RemoteOnlineJudgeError(`[Post Target/Receive/Request] ${res.message}`);
this.response.body = { code: 0 };
}
}