In Grails, Handle Exception by custom controller

25 Views Asked by At

In Grails, I want to handle the exception in my custom controller(ErrorController) to server for both MVC and REST request. If i put mapping In UrlMappings.groovy like "500"(controller : "error", action : "index") it cause issue in my interceptor that checks TenantID in request.

Is there any way that i can use mapping like "500"(uri:"/${tenantID}/error/index"), i tried this but not working and grails returning its default 500 error page. REF: https://docs.grails.org/latest/guide/theWebLayer.html#mappingToResponseCodes

0

There are 0 best solutions below