-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctx.throw(Boom.badRequest(error)) #10
Comments
Set ctx.api to true? See README
…On February 28, 2019 11:45:17 AM UTC, Erwan Akse ***@***.***> wrote:
`ctx.throw(Boom.badRequest(error))`
returned
Content-Type | text/plain
how to change to
Content-Type | application/json
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#10
|
i do but it still return text this is set
this on the route
|
Same here. I am setting the api flag on the app context: |
I've fixed this in v2.0.0. Please install this version: npm install koa-better-error-handler@latest or yarn add koa-better-error-handler@latest This version has a patch in place so that if |
ctx.throw(Boom.badRequest(error))
returned
Content-Type | text/plain
how to change to
Content-Type | application/json
The text was updated successfully, but these errors were encountered: