Skip to content

Commit d56f87c

Browse files
committed
docs(push): note the failure kinds the gateway never pushes
1 parent 2ffd1a0 commit d56f87c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎web/src/push/sw-notification.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ const FAILURE_REASONS: ReadonlyMap<string, string> = new Map([
3838

3939
/**
4040
* Allowlisted `data.failureLabel` values: the failure kinds the gateway puts in
41-
* a push payload. An unrecognized label (including any attacker-controlled
42-
* string from the push payload) is never rendered. `unknown` is allowlisted
43-
* but has no reason text, so it renders the generic copy.
41+
* a push payload. The gateway's push allowlist leaves out
42+
* `checkout-substituted` and `workspace-unavailable`, so those never arrive as
43+
* a label. An unrecognized label (including any attacker-controlled string
44+
* from the push payload) is never rendered. `unknown` is allowlisted but has
45+
* no reason text, so it renders the generic copy.
4446
*/
4547
export const KNOWN_FAILURE_LABELS: ReadonlySet<string> = new Set([...FAILURE_REASONS.keys(), 'unknown'])
4648

0 commit comments

Comments
 (0)