You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that, huma only support pre process middleware. Since the Register API once it invoke the handler, it must write the response immediately. But, there's such as post process middleware. Like error recovery handler. For example, my Recover middleware are as follow
I use factory pattern in here, but the goal is, when there's unexpected panic, I want to do some stuff to it. Like set the headers and stuff. I dont see a way to accomplish similar thing in huma yet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I notice that, huma only support pre process middleware. Since the Register API once it invoke the handler, it must write the response immediately. But, there's such as post process middleware. Like error recovery handler. For example, my Recover middleware are as follow
I use factory pattern in here, but the goal is, when there's unexpected panic, I want to do some stuff to it. Like set the headers and stuff. I dont see a way to accomplish similar thing in huma yet.
Beta Was this translation helpful? Give feedback.
All reactions