-
-
Notifications
You must be signed in to change notification settings - Fork 788
Description
Describe the bug
I'm using a custom error for my server functions and I'm setting type Encoder = leptos::server_fn::codec::JsonEncoding
in my impl FromServerFnError
. I would expect this to set the content-type: application/json
header like leptos does for successful API responses, but the header is not set at all. I noticed that this also impacts the built-in ServerFnError
-- I would expect it to set the header to text/plain
, but it's missing.
Leptos Dependencies
Leptos 0.8.6
and the latest main
branch. Example repro: spencewenski@3cd8c37
To Reproduce
Steps to reproduce the behavior:
- Update a server function to return an error. In the above repro,
clear_server_count
is updated. - Run the
counter_isomorphic
example in in the above repro. - Click the
Clear
button - Observe that the response does not include the
content-type
.
Screenshots

Next Steps
- I will make a PR
- I would like to make a PR, but need help getting started
- I want someone else to take the time to fix this
- This is a low priority for me and is just shared for your information
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels