Closed ckpiggy closed 7 years ago
you should use router with #404 in the first arguments
F.route('#404', cb)
And if you want to rewrite throw404 method, you should change the prototype Controller.prototype.throw404
@luoage thx for reply. But I don't want to rewrite throw404 method. What I want to address are
controller.throw400
and controller.res.throw400
, controller.res.throw400
wont send problem message with response.@ckpiggy there is a bug. I have fixed it + I have published a new beta version $ npm install total.js@beta
(stable).
@luoage thank you!
Wow so fast! I was trying to send a PR. Thank you @petersirka !
Thank you!
I got 2 problem
When I use
controller.throw400(' a test error')
, the response is400: Bad Requesta test error
. Should it be400: Bad Request a test error
? (I am not sure if you need to add a space to append the problem description, since we can add the space when we input the description :-) )When I use
controller.res.throw400('a test error')
, I got only400: Bad Request
response. The problem description is missing.