From a44ac3306e5c49b7d6763d1e95596daef8630dcf Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Fri, 22 Feb 2019 14:22:40 +0900
Subject: [PATCH] Fix error response format

---
 src/server/api/api-handler.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts
index 39caba6b18..5cd8cf1e2a 100644
--- a/src/server/api/api-handler.ts
+++ b/src/server/api/api-handler.ts
@@ -15,7 +15,7 @@ export default async (endpoint: IEndpoint, ctx: Koa.BaseContext) => {
 			ctx.status = 204;
 		} else if (typeof x === 'number') {
 			ctx.status = x;
-			ctx.body = y;
+			ctx.body = { error: y };
 		} else {
 			ctx.body = x;
 		}