gin server custom error handler option
allows for a custom error handler option to the gin server code generation. default/existing behavior is preserved.
i really want my employer to use this tool going forward, but gin is a requirement, and is custom error handling.
Closes: https://github.com/deepmap/oapi-codegen/issues/584.
bool return value vs error return value?
Well, the error is what the handler is handling, so it seems superfluous to return it back to the caller. Or am I misunderstanding what you mean?
@deepmap-marcinr @jxsl13 Hey, all. Just a friendly checkup. Any update on this?
I just had the thought that it might (or might not) make sense to return error values from the error handler in order to do whatever one wants to do with them, log, report, send somewhere, etc.
It's more or less a discussion topic, I'd guess that maybe someone might have a use case for returning an error instead of a bool.
If not, bool is fine.
@deepmap-marcinr Sorry to bug ya. Was just wondering if these changes might be good to go?
I've been very busy, I'll take a look when I can
From: chase isabelle @.***> Sent: Friday, May 27, 2022 10:37 AM To: deepmap/oapi-codegen Cc: Marcin Romaszewicz; Mention Subject: Re: [deepmap/oapi-codegen] gin server custom error handler option (PR #587)
@deepmap-marcinrhttps://github.com/deepmap-marcinr Sorry to bug ya. Was just wondering if these changes might be good to go?
— Reply to this email directly, view it on GitHubhttps://github.com/deepmap/oapi-codegen/pull/587#issuecomment-1139865563, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALKC5DA4UEAANK6J26S5W6DVMEB5PANCNFSM5WRHSTRQ. You are receiving this because you were mentioned.Message ID: @.***>
I've managed to mitigate this with custom templates: https://github.com/deepmap/oapi-codegen#making-changes-to-code-generation
It would be nice if this gets implemented... What is holding it back atm? Mitigating it with custom templates is suboptimal and without all the built-in errors returns a different format than the spec that is loaded...
Let me know if I can help out.
I've been super busy and not putting much work into oapi-codegen recently. All this needs is to have the conflict resolved. I'll see if I can have a look a little later today.
Awesome, thanks!