Added exceptionCaught method for handling exceptions in routes