Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to parse as JSON the result from a server function redirect #1604

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

JonRCahill
Copy link
Contributor

@JonRCahill JonRCahill commented Aug 28, 2023

When a server function redirects using leptos_actix::redirect or leptos_axum::redirect the result of that redirect will be a page not JSON, but the ActionForm on_response still attempts to parse it as JSON. This change just adds a guard to not attempt to parse the body of a redirected response.

This should address the error part of #1600

@gbj
Copy link
Collaborator

gbj commented Aug 30, 2023

Looks good, thanks.

@gbj gbj merged commit e0a132b into leptos-rs:main Aug 30, 2023
54 checks passed
@gbj gbj mentioned this pull request Jan 4, 2024
20 tasks
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