pub enum Error {
InvalidRequestError,
InsufficientPlan,
InvalidApiKey,
InvalidParameter,
RateLimitError,
InternalServerError,
ApiConnectionError,
Reqwest(Error),
Middleware(Error),
Json(Error),
}Expand description
Error enum for handling different types of errors within the client
Variants§
InvalidRequestError
400 Bad Request
The server could not process the request due to invalid request parameters or invalid format of the parameters.
InsufficientPlan
402 Payment Required
The request could not be processed because of the user has an insufficient plan. If you want to be able to process this request, get a higher plan.
InvalidApiKey
403 Forbidden
The request could not be processed due to invalid API key.
InvalidParameter
404 Not Found
The server could not process the request due to invalid URL or invalid path parameter.
RateLimitError
429 Too Many Requests
The rate limit has been exceeded. Reduce the frequency of requests to avoid this error.
InternalServerError
500 Internal Server Error
An unexpected server error has occured.
ApiConnectionError
Failed to connect with API.
Reqwest(Error)
Error from http client.
Middleware(Error)
Error from client middleware.
Json(Error)
Error from JSON creation/processing.