diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-22 14:22:40 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-22 14:22:40 +0900 |
| commit | a44ac3306e5c49b7d6763d1e95596daef8630dcf (patch) | |
| tree | 6198b2f4c11ce1c76b7cb9043f1b15b4c30a2adf /src/server | |
| parent | Fix bug (diff) | |
| download | sharkey-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.ts | 2 |
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; } |