APIError

public enum APIError : Error, Equatable

Errors related to API failures (PaygateError)

  • unsupportedRequestType: Indicates that the request type is not supported by the API handler.
  • invalidResponse: Indicates an error due to an invalid or unexpected response format from the server.
  • requestFailed(Error): Indicates that a network request has failed due to an underlying error (e.g., connectivity).
  • badRequest(PaygateBadRequestError): Corresponds to a 400 Bad Request, wrapping specific details about invalid parameters.
  • unprocessableEntity(PaygateUnprocessableEntity): Corresponds to a 422 Unprocessable Entity, where the request was well-formed but couldn’t be processed logically.
  • internalServerError(PaygateInternalError): Corresponds to a 500 Internal Server Error, wrapping server-side error details.