Repository navigation
docs: explain how to handle sendNotification() error status codes - #991
SrijaVuppula wants to merge 2 commits into
Conversation
|
Can you reference the web push standards for the 4** errors? |
Link each 4xx case in the "Handling errors" section to the section of RFC 8030, RFC 8291, RFC 8292 or RFC 9110 that defines it, add the 401/403 VAPID case, and state the 413 limit precisely (4096 bytes of payload body, at most 3993 bytes of plaintext with aes128gcm).
e3efab1 to
10980d3
Compare
|
Thanks for the suggestion! I've added links to the relevant RFC sections for each of the 4xx cases. A couple of things I changed while doing that: The 413 note was a bit off. RFC 8030 says push services have to accept payloads up to 4096 bytes, and with aes128gcm that leaves about 3993 bytes for the actual message (RFC 8291), so I reworded it. Happy to drop the 401/403 part if you'd rather keep the PR focused on the original list. |
|
Hi @marco-c, I’ve added the RFC references you asked for (plus a small fix to the 413 note). Whenever you have a moment, could you take another look? Happy to adjust or drop anything, including the 401/403 bullet. |
sendNotification()currently documents that a rejection carriesstatusCode,headers, andbody, but doesn't explain what to do with them. This adds ashort "Handling errors" section covering the status codes that matter most in
practice — distinguishing a permanently dead subscription (404/410, safe to
delete) from a transient failure worth retrying (429, 5xx) — with a small
code example.
No code changes, README only.