Skip to content

Docs: show error-status checks in the widget data example - #75

Merged
SandObserver merged 1 commit into
mainfrom
docs/widget-template-fails-on-errors
Oct 2, 2026
Merged

SandObserver merged 1 commit into
mainfrom
docs/widget-template-fails-on-errors

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Update the data.js example on the create-a-widget page to fail through ctx.fail on 401 and 403, on any status of 400 or above, and on a reply without items, matching the app's widget template (app #366).
  • Replace the sentence saying the template returns { error } for a missing URL; the template now reports it through ctx.fail.

Testing
npm run build and npm run check pass. Text-only change.

Checklist

  • npm run build and npm run check both pass.
  • Product UI is shown by running or capturing it, never recreated in CSS.
  • Any new preview or screenshot carries no private hostnames or real data.
  • Visual changes verified in both colour schemes and both docs themes.
  • Links to the app repo still resolve.

The template reports a missing URL, error statuses and a reply without items
through ctx.fail. The example matches it, and the sentence claiming the
template returns { error } is replaced.
@SandObserver SandObserver added the documentation Improvements or additions to documentation label Oct 2, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying stackyard-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f9c162f
Status: ✅  Deploy successful!
Preview URL: https://40be73b6.stackyard-docs.pages.dev
Branch Preview URL: https://docs-widget-template-fails-o.stackyard-docs.pages.dev

View logs

@SandObserver
SandObserver merged commit 746551f into main Oct 2, 2026
2 checks passed
@SandObserver
SandObserver deleted the docs/widget-template-fails-on-errors branch October 2, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant