What's the best way to debug 422s from webhooks? #2200
Unanswered
thomasmost
asked this question in
Q&A
Replies: 2 comments
-
Try https://docs.rs/axum/0.6.20/axum/extract/index.html#logging-rejections |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you — this looks promising! I'll need to dig into how/when to enable this in my Cloud Run instances |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've clearly messed up my struct definition for the expected body of a certain request, but the 422 doesn't contain any additional information (in general, serde Deserialization errors leave something to be desired IMO)
So what's the best way of debugging this? Change the payload to
axum::Json<serde_json::Value>
and manually log it and then deserialize it in code? Or is there a way to flag the endpoint to log raw output on a 422?Beta Was this translation helpful? Give feedback.
All reactions