Is there a standard way in Magento 2 to programmatically trigger an HTTP error state and have the system just deal with it? i.e. is there a standard exception we can throw or global method we can call when, in our code, something unexpected happens and we just want to send the user to an error page?
Or is the only way to deal with this to create your own error state, and then ensure your controller's
execute method returns an appropriate error code?