Skip to content

Conversation

gaetschwartz
Copy link

@gaetschwartz gaetschwartz commented Oct 15, 2025

  • Add From<miette::Report> for ServerFnError with diagnostic serialization
  • Implement RequestDecodeErr and MakeAxumError traits for miette::Report
  • Add OrHttpError trait implementation for seamless error conversion
  • Update hotdog example to use miette::Result for some fns

Server functions can now return miette::Result<T> just like anyhow::Result.

- Add From<miette::Report> for ServerFnError with diagnostic serialization
- Implement RequestDecodeErr and MakeAxumError traits for miette::Report
- Add OrHttpError trait implementation for seamless error conversion
- Include comprehensive diagnostic info (code, severity, help, url, labels)
- Add test case demonstrating miette::Result usage in server functions
- Update hotdog example to explicitly use anyhow::Result (cleanup)

Server functions can now return miette::Result<T> with the same seamless
integration as anyhow::Result<T>, automatically converting errors using the
? operator without explicit conversion methods.
@gaetschwartz gaetschwartz requested a review from a team as a code owner October 15, 2025 07:28
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.

1 participant