Skip to content

Commit

Permalink
Destroy subscription if it's erroring out
Browse files Browse the repository at this point in the history
  • Loading branch information
miharekar committed Jan 14, 2025
1 parent 980fa26 commit eaf31a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/web_push_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def perform(push_subscription, title:, body:, path: "/")
private_key: Rails.application.credentials.webpush.private_key
}
)
rescue WebPush::ExpiredSubscription
rescue WebPush::ExpiredSubscription, WebPush::PushServiceError
push_subscription.destroy
end
end

0 comments on commit eaf31a1

Please sign in to comment.