pub enum ObjectClientError<S, C> {
ServiceError(S),
ClientError(C),
}Expand description
The top-level error type returned by calls to an ObjectClient.
Errors that are explicitly modeled on a per-request-type basis are ServiceErrors. Other
generic or unhandled errors are ClientErrors.
The distinction between these two types of error can sometimes be blurry. As a rough heuristic,
ServiceErrors are those that any reasonable implementation of an object client would be
capable of experiencing, and ClientErrors are anything else. For example, any object client
could experience a “no such key” error, but only object clients that implement a permissions
system could experience “permission denied” errors. When in doubt, we err towards not adding
new ServiceErrors, as they are public API for every object client.
Variants§
ServiceError(S)
An error returned by the service itself
ClientError(C)
An error within the object client (for example, an unexpected response, or a failure to construct the request).