TsgcWSAPIServer_WebPushEvents › OnWebPushSendNotificationException

OnWebPushSendNotificationException Event

Fires when an exception is raised while POSTing a notification to the push service (typical causes: 400 Bad Request, 404/410 Gone for expired endpoints, TLS or network failures).

Syntax

public event TsgcWSWebPushSendNotificationExceptionHandler OnWebPushSendNotificationException;
// delegate void TsgcWSWebPushSendNotificationExceptionHandler(TObject Sender, TsgcHTTP_API_WebPush_PushSubscription aSubscription, Exception E, out bool Remove)

Default Value

Remarks

Raised from both SendNotification and the per-subscriber loop inside BroadcastNotification. The Remove var-parameter defaults to True: leaving it as-is drops the offending subscription from the internal list (the correct behaviour for permanent failures such as HTTP 410 Gone). Set it to False to keep the subscription and retry later, for example when the failure is transient (network timeout, 5xx from the push service). Use E for logging and diagnostics.

Example

Back to Events