Skip to content

fix(astro): handle invalid encrypted props in server island#14786

Merged
matthewp merged 7 commits intowithastro:mainfrom
mef:fix-encrypted-props-error-handling
Nov 17, 2025
Merged

fix(astro): handle invalid encrypted props in server island#14786
matthewp merged 7 commits intowithastro:mainfrom
mef:fix-encrypted-props-error-handling

Conversation

@mef
Copy link
Copy Markdown
Contributor

@mef mef commented Nov 17, 2025

Changes

Testing

  • Tests added in astro/test/server-islands-test.js:
    • before fail (error 500)
    • after pass (error 400)

Docs

No change is needed for Astro users.

Before this fix, an error is logged without any context, making it not clear at all that the issue was linked to server islands. After this fix, error 400 explains that Encrypted props value is invalid.

Other

Open to suggestions regarding the label of the badRequest message, and potentially extra logging.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Nov 17, 2025

🦋 Changeset detected

Latest commit: 5234c2a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label Nov 17, 2025
@mef mef changed the title fix(astro): handle invalid encrypted props in server island #14768 fix(astro): handle invalid encrypted props in server island Nov 17, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 17, 2025

📝 Changeset Validation Results

Changeset validation failed

Issues Found:

.changeset/better-weeks-buy.md

Issue with: 'Add handling of invalid encrypted props in server islands.'

Errors:
• Verb tense is incorrect; it should use the third-person singular present-tense.
• Description does not properly match the 'patch' change type definition by specifying only an action without the issue fixed.

💡 Revise to: Adds handling for invalid encrypted props in server islands, correcting issues with data integrity and improving reliability.


📖 See Astro's changeset guide for details.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Nov 17, 2025

CodSpeed Performance Report

Merging #14786 will not alter performance

Comparing mef:fix-encrypted-props-error-handling (5234c2a) with main (504958f)1

Summary

✅ 6 untouched

Footnotes

  1. No successful run was found on main (ebf44ec) during the generation of this report, so 504958f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Copy Markdown
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

There will soon be a PR about slots encryption so let's wait until said PR lands so this PR can also tackle error handling of slots decryption. Other than that it looks pretty good thanks!

@matthewp
Copy link
Copy Markdown
Contributor

@florian-lefebvre that was here: #14772 already merged and released.

If @mef wants to update this PR to do that as well that's fine with me, but also don't think we should block this improvement because of other things that should also be improved.

@mef
Copy link
Copy Markdown
Contributor Author

mef commented Nov 17, 2025

Thanks, I just implemented the same logic for encrypted slots, and included tests.

@matthewp
Copy link
Copy Markdown
Contributor

Tests are random failures, I'll rerun.

@matthewp matthewp merged commit 758a891 into withastro:main Nov 17, 2025
82 of 88 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants