Skip to content

Errors ​

Every error the SDK raises inherits from PaystackSdk::Error.

ClassInherits fromWhen
PaystackSdk::APIErrorPaystackSdk::ErrorBase class for API errors. Raised when the Paystack API returns an error response.
PaystackSdk::AuthenticationErrorPaystackSdk::APIErrorRaised when authentication fails
PaystackSdk::ConnectionErrorPaystackSdk::ErrorRaised when a request could not reach Paystack (DNS, refused, reset, ...) after all retries were exhausted.
PaystackSdk::ErrorStandardErrorBase error class for all Paystack SDK errors. All SDK-specific exceptions inherit from this class.
PaystackSdk::InvalidFormatErrorPaystackSdk::ValidationErrorRaised when a parameter has an invalid format. Contains both the parameter name and expected format for detailed error handling.
PaystackSdk::InvalidPayloadErrorPaystackSdk::WebhookErrorRaised when a correctly signed webhook body is not a JSON event.
PaystackSdk::InvalidSignatureErrorPaystackSdk::WebhookErrorRaised when a webhook's signature does not match its payload. Treat the request as not coming from Paystack.
PaystackSdk::InvalidValueErrorPaystackSdk::ValidationErrorRaised when a parameter has an invalid value. Contains both the parameter name and the reason for the invalid value.
PaystackSdk::MissingParamErrorPaystackSdk::ValidationErrorRaised when a required parameter is missing. Contains the parameter name for detailed error handling.
PaystackSdk::RateLimitErrorPaystackSdk::APIErrorRaised when rate limiting is encountered
PaystackSdk::ResourceNotFoundErrorPaystackSdk::APIErrorRaised when a resource is not found
PaystackSdk::ServerErrorPaystackSdk::APIErrorRaised when the server returns a 5xx error
PaystackSdk::TimeoutErrorPaystackSdk::ConnectionErrorRaised when a request to Paystack timed out after all retries were exhausted.
PaystackSdk::ValidationErrorPaystackSdk::ErrorBase class for all validation errors. Raised when input parameters fail validation before API calls.
PaystackSdk::WebhookErrorPaystackSdk::ErrorBase class for webhook errors.

Unofficial community SDK. Not affiliated with or endorsed by Paystack. · MIT License · rubygems.org/gems/paystack_sdk