summaryrefslogtreecommitdiff
path: root/src/server/api/api-handler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/api-handler.ts')
-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;
}