Files
leptos/examples/errors_axum
Spencer Ferris b44f244e5e feat: Allow customizing the status code of server fn error responses (#4536)
* feat: Allow customizing the status code of server fn error responses

Currently, all server function error responses have status code 500.
This is not ideal, especially when it comes to observability. If every
error response has status 500, then it's difficult to see which errors
are client errors (404, unauthorized access attempts, etc) vs which
ones are actual internal server errors that need to be investigated.

This PR builds on https://github.com/leptos-rs/leptos/pull/4249 to allow
customizing the http status code for server function error responses.

* Convert between two different versions of `http::status::StatusCode`
2026-01-15 19:33:56 -05:00
..

Leptos Errors Demonstration with Axum

This example demonstrates how Leptos Errors can work with an Axum backend on a server.

Getting Started

See the Examples README for setup and run instructions.

Quick Start

Run cargo leptos watch to run this example.