New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gin server custom error handler option #587
gin server custom error handler option #587
Conversation
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-marcinr<https://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 GitHub<#587 (comment)>, or unsubscribe<https://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? 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. |
This pull request has been in the queue for a long time, and diverged a lot. Fix various issues related to that.
be3b3b4
to
9156bd2
Compare
Awesome, thanks! |
* gin server custom error handler option * removed bool return * ran make gen * Fix various issues from rebasing against master This pull request has been in the queue for a long time, and diverged a lot. Fix various issues related to that. Co-authored-by: marcinromaszewicz <marcinromaszewicz@deepmap.ai>
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: #584.