drahak / Restful

Drahak\Restful - Nette REST API bundle
0 stars 0 forks source link

Handling 405 exception. #98

Open kuzmamar opened 8 years ago

kuzmamar commented 8 years ago

How do you handle \Drahak\Restful\Application\BadRequestException when invalid method is used for request? It is thrown on application startup way before the presenter is loaded so i cant handle it in presenter. I tried to forward from \ErrorPresenter to my module presenter :Api:ErrorPresenter:default but the method does not get called. As a result of that I get 204 No Content response. For some reason the forwarding does not work.