heya, does anyone know if it’s possible to get the original ctx in a yada error-handler. I’m trying to log the body of a POST request when there’s an error, but the processed request body is not present
iirc the body is (sometimes, perhaps not always) in a stateful InputStream, and once that is consumed it's gone - unless you keep a reference to whatever you parsed out of the InputStream so you could add an interceptor to read the InputStream, add the parsed value to the ctx and put a ByteArrayInputStream back in to the ctx to replace the original InputStream
thanks so much!
there should be a PR by me on the yada repo that does just this
my PR gives the CTX up to the error, and then starts the error interceptors with that ctx. if that is what you need then look at that PR