reown-com / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
150 stars 52 forks source link

Show APNS error reason in Display impl #11

Closed dbrgn closed 6 years ago

dbrgn commented 6 years ago

If the error is a ResponseError that contains an error reason (as sent by Apple), then show it in the fmt::Display impl.

This helps a lot when debugging.

Example output:

Notification was not accepted by APNs (reason: BadDeviceToken)

pimeys commented 6 years ago

Yeah, we didn't need this because we just graph them through Prometheus anyways and log them to Graylog.