Fix views to return error response