Skip to content

Conversation

@constantoine
Copy link
Contributor

@constantoine constantoine commented Jun 4, 2025

As explained in #70, not using %w formatting directive in some places makes it non-trivial for the user to make use of the error in a meaningful way (errors.Is or errors.As), outside of string matching. This is particularly painful for errors returned by custom type's XXXUnmarshaler

This PR aims to change the remaining fmt.Errorf calls where %w directive isn't used but an error is passed while adding no new code.

@constantoine constantoine requested a review from a team as a code owner June 4, 2025 12:38
@constantoine
Copy link
Contributor Author

Hi @jamietanna I hope the ping is not inappropriate :)

Do those changes (as well as the rationale behind them) sound acceptable to you?

@jamietanna
Copy link
Member

jamietanna commented Jun 17, 2025

Pings are not recommended 😅

I have seen this and I do agree with it, thanks for fixing it!

I hadn't got round to replying here, and would like to merge this alongside some other runtime changes, but my focus recently has been trying to get oapi-codegen itself ready for a release, which is slow work 🙃

Will try to get to this soon!

Copy link
Member

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jamietanna jamietanna merged commit 0f4916e into oapi-codegen:main Jul 15, 2025
14 checks passed
@jamietanna jamietanna added the bug Something isn't working label Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants