summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-22 14:22:40 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-22 14:22:40 +0900
commita44ac3306e5c49b7d6763d1e95596daef8630dcf (patch)
tree6198b2f4c11ce1c76b7cb9043f1b15b4c30a2adf /src/server
parentFix bug (diff)
downloadsharkey-a44ac3306e5c49b7d6763d1e95596daef8630dcf.tar.gz
sharkey-a44ac3306e5c49b7d6763d1e95596daef8630dcf.tar.bz2
sharkey-a44ac3306e5c49b7d6763d1e95596daef8630dcf.zip
Fix error response format
Diffstat (limited to 'src/server')
-rw-r--r--src/server/api/api-handler.ts2
1 files changed, 1 insertions, 1 deletions
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;
}