Thrown when Stripe rejects a request, or cannot be reached.
More...
#include <Errors.h>
Thrown when Stripe rejects a request, or cannot be reached.
try {
const auto session = co_await stripe->checkout().sessions().create_async(request);
}
Thrown when Stripe rejects a request, or cannot be reached.
const StripeErrorPayload & payload() const noexcept
Returns the details Stripe gave for the failure.
std::string message
Stripe's human-readable description of the failure.
std::string request_id
Id of the failed request in Stripe's logs, of the form "req_...".
Definition at line 98 of file Errors.h.
◆ StripeApiException()
Creates an API exception from Stripe's error details.
- Parameters
-
| payload | The parsed error details. |
◆ payload()
Returns the details Stripe gave for the failure.
- Returns
- A reference valid for the lifetime of the exception.
◆ retryable()
| bool stripekit::StripeApiException::retryable |
( |
| ) |
const |
|
noexcept |
Returns whether trying the same request again may succeed.
- Returns
- True for transient failures such as rate limits and connection problems; false for anything that will fail the same way again.
The documentation for this class was generated from the following file: