Commit 26a213de authored by mattwire's avatar mattwire
Browse files

Don't save backtrace when event is no longer available

parent 74449047
......@@ -327,7 +327,15 @@ class CRM_Core_Payment_StripeIPN {
else {
// Normal use.
$return->ok = FALSE;
$return->message = $e->getMessage(). "\n" . $e->getTraceAsString();
if (($e instanceof \Stripe\Exception\InvalidRequestException) && ($e->getHttpStatus() === 404)) {
/** @var \Stripe\Exception\InvalidRequestException $e */
// Probably "is no longer available because it's aged out of our retention policy"
// We don't need a backtrace
$return->message = $e->getMessage();
}
else {
$return->message = $e->getMessage() . "\n" . $e->getTraceAsString();
}
$return->exception = $e;
\Civi::log()->error("StripeIPN: processWebhookEvent failed. EventID: {$this->eventID} : " . $return->message);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment