Should the type be determined when the exception is thrown? I depends on what the format the client requests, so should be rendered by the dispatcher.