A lot of methods in the code base change behavior based on a throwError parameter, either returning a valid value, or null/throw exception based on that parameter.
Replace these return types with an ErrorOr result, which allows the caller to check if there was an error or valid value and take the appropriate action based on that.
A lot of methods in the code base change behavior based on a
throwError
parameter, either returning a valid value, or null/throw exception based on that parameter.Replace these return types with an ErrorOr result, which allows the caller to check if there was an error or valid value and take the appropriate action based on that.