Files
ottyl/tickets/019-docs-isError-use-case.md
T
2026-09-05 19:29:01 +01:00

1.3 KiB

Add an "IsError" worked example to the Parameters docs

From WISHLIST.md: add a use case to the docs showing how to create a parameter IsError that's true for any message containing "error" (case-insensitive) and false otherwise.

Add a worked example to the "Parameters" section in webapp/src/components/Docs.tsx (alongside the existing duration worked example) showing how to declare a boolean IsError param: regex (?i)error, kind boolean, no capture group needed, true/false on every line.

This use case surfaces missing functionality — today params always need a capture group and are omitted (not false) on non-matching lines, and there's no boolean kind. Ticket 018 (boolean param kind) was created to cover that missing functionality; this docs ticket depends on it landing first (so the worked example describes real, working behavior) — indicate in the doc's example that it relies on the boolean param kind.

Acceptance criteria

  • Depends on ticket 018 (boolean param kind) — implement/land that first.
  • "Parameters" section in Docs.tsx gets a new worked example: declaring IsError with regex (?i)error, kind boolean, showing it as true/false on every log line.
  • The existing duration worked example and surrounding prose are otherwise unchanged.