Repository navigation
DeliveryResult
Viames Marino edited this page Feb 22, 2026
·
1 revision
Pair\Push\DeliveryResult is a value object representing the outcome of one push delivery attempt.
-
success(bool) -
statusCode(?int) -
error(?string) -
endpoint(string) -
shouldDeleteSubscription(bool)
new DeliveryResult(
string $endpoint,
bool $success = false,
?int $statusCode = null,
?string $error = null,
bool $shouldDeleteSubscription = false
)$results = $dispatcher->sendToUser($userId, $notification);
foreach ($results as $result) {
if ($result->success) {
continue;
}
// log issue
error_log('Push failed for ' . $result->endpoint . ': ' . ($result->error ?? 'unknown'));
if ($result->shouldDeleteSubscription) {
// already handled by dispatcher in default flow
}
}-
success=truemeans provider accepted delivery. -
statusCodemay be null when provider report is unavailable. -
shouldDeleteSubscription=trueindicates stale/invalid endpoint (typically HTTP 404/410).
See also: PushDispatcher, WebPushSender, Notification.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4