Skip to content

Endpoint with [FormData] and TenantId parameter fails with 415 http error#1891

Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom
marcpiechura:formdata_tenantid
Dec 8, 2025
Merged

Endpoint with [FormData] and TenantId parameter fails with 415 http error#1891
jeremydmiller merged 1 commit intoJasperFx:mainfrom
marcpiechura:formdata_tenantid

Conversation

@marcpiechura
Copy link
Contributor

@marcpiechura marcpiechura commented Dec 2, 2025

When using the FormData attribute and the TenantId parameter, codegen tries to create the TenantId from the json body and therefore requests with form data fail since the endpoint expects json. As a workaround, one can use the [FromServices] attribute on the TenantId parameter.
Not sure where to fix that, but at least you've a failing test ;)

@jeremydmiller
Copy link
Member

Failing tests are the best repro steps. Will get this in soon-ish

@jeremydmiller jeremydmiller merged commit 4fc7b91 into JasperFx:main Dec 8, 2025
1 check passed
@jeremydmiller
Copy link
Member

@marcpiechura That was an awful bug, thanks for the repro. Nothing to do w/ multi-tenancy per se.

Fix will be in 5.7:

#1914

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.

2 participants