OverviewFilesCommitsIssuesDocsReleasesPeers

apds commits / a7e6a15

still rejecting
a7e6a1527af3887b4035cac11b3d2b779a3cee72
by Everett Bogue <ev@evbogue.com> · 2025-12-13T19:27:54.000Z

Changed files (1) +8 -2

serve.js +8 -2
……@@ -141,11 +141,17 @@ const broadcastPushWithResults = async (payloadObj) => {
141141 try {
142142 const res = await sendWebPush(subscription, payloadObj)
143143 const status = res.status
144 let body
145 if (!res.ok) {
146 try {
147 body = (await res.text()).slice(0, 2000)
148 } catch {}
149 }
144150 if (status === 404 || status === 410) dead.add(endpoint)
145151 if (!res.ok) {
146 console.log('webpush send failed', { endpoint: redactEndpoint(endpoint), status })
152 console.log('webpush send failed', { endpoint: redactEndpoint(endpoint), status, body })
147153 }
148 return { endpoint: redactEndpoint(endpoint), status, ok: res.ok }
154 return { endpoint: redactEndpoint(endpoint), status, ok: res.ok, body }
149155 } catch (err) {
150156 console.log('webpush send error', { endpoint: redactEndpoint(endpoint), err: String(err?.message || err) })
151157 return { endpoint: redactEndpoint(endpoint), error: String(err?.message || err) }