invoke
Create an ApiResult instance using the given value. When value is an Exception, an error result will be created. Otherwise, a success result will be created.
If you want to directly create a success value of an Exception, use Success
Execute call, catching any exceptions, and wrap it in an ApiResult.
Caught exceptions are mapped to ApiResult.Errors. Throwables are not caught on purpose. CancellationExceptions are rethrown.
Returns an ApiResult value. Use this for applying operators such as require
and mapWrapping
to build chains of operators that should start with an empty value.