NoopWebpusher is a Dispatcher that always fails, returning Msg as the error. It is used as a fallback when VAPID key setup fails. The underlying error is not included to avoid leaking internal details (e.g. database errors) in API responses; it is logged at the call site instead.
| 463 | // details (e.g. database errors) in API responses; it is logged at |
| 464 | // the call site instead. |
| 465 | type NoopWebpusher struct { |
| 466 | Msg string |
| 467 | } |
| 468 | |
| 469 | func (n *NoopWebpusher) Dispatch(context.Context, uuid.UUID, codersdk.WebpushMessage) error { |
| 470 | return xerrors.New(n.Msg) |
nothing calls this directly
no outgoing calls
no test coverage detected