Return Result<T> instead of T, and include status code and errors.