Error returned (or, from streams, raised) by every Apify API call.
Functions return {:error, %ApifyClient.Error{}}; lazy streams such as
ApifyClient.Datasets.stream_items/2 raise it, since it is an exception.
For API errors, details contains:
:status_code- the HTTP status:error_type- the API's error type, for example"record-not-found", when the response has one:body- the (decoded) response body
Network errors have the transport :reason in details.
Summary
Types
@type error_type() ::
:client_error
| :server_error
| :network_error
| :rate_limit_error
| :authentication_error
| :authorization_error
| :not_found_error
| :validation_error
| :conflict_error
| :timeout_error
| :stream_error
| :file_error
| :unknown_error
@type t() :: %ApifyClient.Error{ __exception__: term(), details: map(), message: String.t(), type: error_type() }