Skip to content

Conversation

@tjsr
Copy link
Contributor

@tjsr tjsr commented Jan 17, 2025

Adds clarification that the onRequest function will not be called if another matching function is found.

Summary

Adds some additional information to clarify onRequest call flow and effects on exported definitions. An issue for this documentation/change request can be found at #19289

Screenshots (optional)

NA

Documentation checklist

Adds clarification that the onRequest function will not be called if another matching function is found.
@tjsr tjsr changed the title Add clarification on onRequest call fall-thgouth Add clarification on onRequest call fall-through Jan 17, 2025
@tjsr
Copy link
Contributor Author

tjsr commented Jan 17, 2025

Issue created at #19290

@ToriLindsay ToriLindsay marked this pull request as ready for review March 19, 2025 09:53
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Mar 19, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Clarified the behavior of the onRequest function in relation to specific request methods.

  • Added clarification that onRequest will not be called if a more specific onRequestVerb method is exported.
  • Specified that onRequest will not be invoked if next(context.request) is called from an onRequestVerb function.

Modified Files

  • src/content/docs/pages/functions/api-reference.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Mar 19, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Clarified the behavior of the onRequest function in relation to specific request methods.

  • Added clarification that onRequest will not be called if a more specific onRequestVerb method is exported.
  • Specified that onRequest will not be invoked if next(context.request) is called from an onRequestVerb function.

Modified Files

  • src/content/docs/pages/functions/api-reference.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

@ToriLindsay
Copy link
Contributor

Made some changes for grammar/clarity.
@GregBrimble @WalshyDev Would one of you mind verifying this for accuracy? Thank you!

@ToriLindsay ToriLindsay merged commit bc83cee into cloudflare:production Apr 1, 2025
6 checks passed
@ToriLindsay
Copy link
Contributor

Thank you for your contribution @tjsr !

@workers-devprod workers-devprod added the contribution [Holopin] Recognizes a docs contribution, big or small label Apr 1, 2025
@holopin-bot
Copy link

holopin-bot bot commented Apr 1, 2025

Congratulations @tjsr, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm8y89zto124900cl4faynopco

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@ToriLindsay
Copy link
Contributor

Fixes #19290

RebeccaTamachiro pushed a commit that referenced this pull request Apr 21, 2025
* Add clarification on onRequest call fall-thgouth

Adds clarification that the onRequest function will not be called if another matching function is found.

* Update src/content/docs/pages/functions/api-reference.mdx

* Update src/content/docs/pages/functions/api-reference.mdx

* Update src/content/docs/pages/functions/api-reference.mdx

* Update src/content/docs/pages/functions/api-reference.mdx

Co-authored-by: Greg Brimble <[email protected]>

---------

Co-authored-by: ToriLindsay <[email protected]>
Co-authored-by: Greg Brimble <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes a docs contribution, big or small product:pages size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants