Closed IgnisDa closed 1 year ago
Thanks for this awesome project! The examples are a bit lacking on how to work with returning errors and status code.
For example I have a handler:
#[axum::debug_handler] pub async fn create_user( State(pool): State<PgPool>, Json(user): Json<CreateUserInput>, ) -> Result<(StatusCode, Json<CreateUserOutput>), (StatusCode, Json<CreateUserOutputError>)> { }
This raises errors. I could be doing something wrong and would be glad if someone could guide me.
Can you provide the error? It's likely that your struct does not derive JsonSchema
JsonSchema
I got this working in a different way, thanks for responding.
Thanks for this awesome project! The examples are a bit lacking on how to work with returning errors and status code.
For example I have a handler:
This raises errors. I could be doing something wrong and would be glad if someone could guide me.