From 03048eb80b6f65ab42b1fd11db9fa973c8cf4088 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 27 Jun 2025 15:53:33 +0800 Subject: mail: fix s3 key not found, put this message in http response. --- deno/mail-relay/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'deno/mail-relay/app.ts') diff --git a/deno/mail-relay/app.ts b/deno/mail-relay/app.ts index af328da..332c430 100644 --- a/deno/mail-relay/app.ts +++ b/deno/mail-relay/app.ts @@ -39,13 +39,13 @@ export function createHono(outbound: MailDeliverer, inbound: MailDeliverer) { hono.onError((err, c) => { console.error("Hono handler threw an uncaught error.", err); - return c.json({ msg: "Server error, check its log." }, 500); + return c.json({ message: "Server error, check its log." }, 500); }); hono.use(honoLogger()); hono.post("/send/raw", async (context) => { const body = await context.req.text(); if (body.trim().length === 0) { - return context.json({ msg: "Can't send an empty mail." }, 400); + return context.json({ message: "Can't send an empty mail." }, 400); } else { const result = await outbound.deliverRaw(body); return context.json({ @@ -55,7 +55,7 @@ export function createHono(outbound: MailDeliverer, inbound: MailDeliverer) { }); hono.post("/receive/raw", async (context) => { await inbound.deliverRaw(await context.req.text()); - return context.json({ msg: "Done!" }); + return context.json({ message: "Done!" }); }); return hono; -- cgit v1.2.3