Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to v4 make tRPC api requests fail in 404 error #9496

Closed
1 task
cmnstmntmn opened this issue Dec 21, 2023 · 1 comment · Fixed by #9497
Closed
1 task

Upgrading to v4 make tRPC api requests fail in 404 error #9496

cmnstmntmn opened this issue Dec 21, 2023 · 1 comment · Fixed by #9497
Labels
needs triage Issue needs to be triaged

Comments

@cmnstmntmn
Copy link

cmnstmntmn commented Dec 21, 2023

Astro Info

Astro                    v4.0.7
Node                     v21.2.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Trying to integrate a fresh Astro 4 instalation with tRPC, following the official docs here is not working.

This issue has been also mentioned here and here

What's the expected result?

Return a successful response when accessing
http://localhost:4321/trpc/test or any other method under the endpoint.

Link to Minimal Reproducible Example

https://github.com/cmnstmntmn/astro-trpc

Participation

  • I am willing to submit a pull request for this issue.
@cmnstmntmn
Copy link
Author

The root cause was the case of the method all instead of ALL;
The lower case for method names were removed in v4.

https://docs.astro.build/en/guides/upgrade-to/v4/#removed-lowercase-http-method-names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant