#Models not supported in exception handlers?
1 messages · Page 1 of 1 (latest)
@brittle cobalt
If no response in a reasonable time, ping @Member.
To close, type !solve or byte solve.
Please include an MCVE so that we can reproduce your issue locally.
Hey @brittle cobalt, sorry for the delay here!
I actually ran into this bug myself a couple of days ago. You're not doing anything wrong here, this seems to be a regression
We've had this bug before and it appears to have resurfaced now 🙂
I think it only appears if I forget to annotate the exception handler return type
it would mean there's not pre-flight check on that
hmm, wrote a minimal code and it still works... not sure why now
Description
When an handler raises an exception and exception handler returns a Response with a model (e.g. pydantic) object, encode that object with the app type_encoders.
Triage Required :hospital:, pr/external, size: small, type/bug