Module common

Source

Functionsยง

build_message_data
Convert a notification into a WebPush message
handle_error
Handle a bridge error by logging, updating metrics, etc This function uses the standard slog recording mechanisms and optionally calls a generic metric recording function for some types of errors. The error is returned by this function for later processing. This can include being called by the sentry middleware, which uses the RecordableError trait to optionally record metrics. see [autopush_common::middleware::sentry::SentryWrapperMiddleware].call() method
incr_error_metric
Increment notification.bridge.error
incr_success_metrics
Update metrics after successfully routing the notification
message_size_check
Check the data against the max data size and return an error if there is too much data.