Skip to content

Bugfix: Fix no context in catchall route#3819

Open
KoolADE85 wants to merge 1 commit into
devfrom
bugfix/3812-fastapi-catchall-context
Open

Bugfix: Fix no context in catchall route#3819
KoolADE85 wants to merge 1 commit into
devfrom
bugfix/3812-fastapi-catchall-context

Conversation

@KoolADE85

Copy link
Copy Markdown
Contributor

Fixes a 500 RuntimeError: No active request in context that breaks custom paths which fall through to the catch-all route.

The catch-all view already receives the request, but we ignored it. This PR registers it into the request context for the duration of the render, mirroring how we handle Dash routes themselves.

Fixes #3812

Contributor Checklist

  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md

@sonarqubecloud

Copy link
Copy Markdown

@T4rk1n T4rk1n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💃

@T4rk1n T4rk1n assigned KoolADE85 and unassigned T4rk1n Jun 17, 2026
@T4rk1n

T4rk1n commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

We have another PR #3815 that also fixes for quart but doesn't use the provided set_current_request, I think set_current_request is valid but maybe both solutions should be consolidated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RuntimeError: No active request in context on catchall route (FastAPI backend)

2 participants