set404Override - JSON not working |
I'm creating a RESTFUl API with JWT. The allowed method is POST, which I've setup in Routes.php. So when end use request with other than "POST" method will end up as 404. I have tried to changed in Routes.php as follows:
PHP Code: $routes->set404Override('App\Controllers\ErrorController::index'); Code: <?php But I test in POSTMAN, it return empty or blank. How can I return JSON in custom 404?
02-15-2022, 08:08 AM
(This post was last modified: 02-15-2022, 08:37 AM by iRedds. Edit Reason: issue )
I think it's a bug.
Until the bug is fixed, you can use this solution. PHP Code: public function index() https://github.com/codeigniter4/CodeIgni...ssues/5697
|
Welcome Guest, Not a member yet? Register Sign In |