Skip to content
Discussion options

You must be logged in to vote

I understand now, a little better at least.

I am adding this to the docs soon, but GET handlers go through the same model as pages in Cache Components.

Here the access to searchParams, causes the handler to "give up" on build time. Your try catch sees that. If you move the access to search params out of the try/catch then you'd stop seeing this issue.

Edit:

x-ref: See also #87732 for the same error with request.url.

Two approaches:

  1. Just ignore it (#87732): This error comes from Cache Components attempting to prerender your GET handler at build time. The build succeeds and the route works correctly at runtime. Suppress the logs with

The build succeeds and the route works at runtime. Supp…

Replies: 2 comments 21 replies

Comment options

You must be logged in to vote
19 replies
@coderrshyam
Comment options

@icyJoseph
Comment options

@coderrshyam
Comment options

@icyJoseph
Comment options

Answer selected by icyJoseph
@coderrshyam
Comment options

@icyJoseph
Comment options

@icyJoseph
Comment options

@coderrshyam
Comment options

Comment options

You must be logged in to vote
2 replies
@dsbrianwebster
Comment options

@icyJoseph
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants