Skip to content

Conversation

@ematipico
Copy link
Member

Changes

Closes #13409

The fixes use the same logic as the dev server. If we can't find a RouteData that matches the incoming request, we seek the /404 route, which we usually have, and pass it to the RenderContext. The RenderContext eventually calls the middleware.

Testing

I added a new test. Hopefully I didn't introduce any regressions

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2025

🦋 Changeset detected

Latest commit: c07e759

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 Mar 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 21, 2025

CodSpeed Performance Report

Merging #13483 will not alter performance

Comparing fix/adapter-call-middleware (c07e759) with main (8b5e4dc)

Summary

✅ 6 untouched benchmarks

Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Nice! Glad this was such a simple fix

@ascorbic
Copy link
Contributor

Ah, missed the test failure

@ematipico ematipico merged commit fc2dcb8 into main Mar 24, 2025
27 of 28 checks passed
@ematipico ematipico deleted the fix/adapter-call-middleware branch March 24, 2025 14:23
@astrobot-houston astrobot-houston mentioned this pull request Mar 24, 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.

Middleware is not called when the adapter is in middleware mode

2 participants