Skip to content

[aws] Add solution to JSON.parse error #94

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

efess
Copy link

@efess efess commented Mar 13, 2025

Found this solution in Discord, might help others if it's searchable

@efess efess requested a review from a team as a code owner March 13, 2025 19:29

This error will occur when the server function is called with a Server Action request which doesn't include a body.

For an AWS Lambda@Edge function, make sure the option `Include Body` is set for the CloudFront request hook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can happen for API gateway as well, and probably some other places. Maybe something more generic first like Make sure that the body is properly forwarded to the server function and then for example on lamdba@edge ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the lambda edge example since it's a non-standard setup.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants