KosliError or one of its subclasses. Network-level failures throw one of the client error classes listed below.
KosliError
KosliError is the base class for any non-2xx HTTP response. It exposes:
HTTP error classes
These named subclasses cover the most common API errors:Network errors
These errors are thrown when the request cannot be completed at the transport level:
Network errors do not have a
statusCode - handle them separately from KosliError:
Other errors
A small number of operations can throw additional error types for specific conditions:
Check the method’s documentation to see which errors apply to a specific operation.