CodeIgniter Forums
Error DB handling - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Error DB handling (/showthread.php?tid=71554)



Error DB handling - thebachtiarz - 08-27-2018

just request: maybe codeigniter-4 have to make an error handling for error 403 like "$route['404_override']" to "$route['403_override']"


RE: Error DB handling - Pertti - 08-28-2018

It depends.

403 can happen on webserver side, in which case request won't even make it to PHP / CodeIgniter.

If you want to use 403 resource yourself in your application, because CodeIgniter doesn't handle your app authentication, it wouldn't know if something is restricted or not, developer would need to build that in.

However, I assume you mean php/general config errors?

Here's a little explanation how to handle custom error exceptions, https://bcit-ci.github.io/CodeIgniter4/general/errors.html#custom-exceptions