#Models not supported in exception handlers?

1 messages · Page 1 of 1 (latest)

brittle cobalt
#

I have a pydantic1 model class for error messages, but when I return Response(ErrorModel) from my exception handler I get type not supported
Am I doing something wrong?

reef trellisBOT
#
Notes for Models not supported in exception handlers?
At your assistance

@brittle cobalt

No Response?

If no response in a reasonable time, ping @Member.

Closing

To close, type !solve or byte solve.

MCVE

Please include an MCVE so that we can reproduce your issue locally.

barren hill
#

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 🙂

brittle cobalt
#

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

brittle cobalt
timid crestBOT