Skip to content
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

Return only abstract errors #30

Merged
merged 1 commit into from
May 16, 2024

Conversation

mristin
Copy link
Contributor

@mristin mristin commented May 16, 2024

We returned concrete errors (such as jsonization.DeserializationError) instead of abstract error's. This is a common footgun in Go, see this page in Golang's documentation.

Instead, in this patch, we always return the abstract error's.

Fixes #28.

We returned concrete errors (such as `jsonization.DeserializationError`)
instead of abstract `error`'s. This is a common footgun in Go, see [this
page in Golang's documentation].

Instead, in this patch, we always return the abstract `error`'s.

Fixes #28.

[this page in Golang's documentation]: https://go.dev/doc/faq#nil_error
@mristin mristin force-pushed the mristin/Return-abstract-errors-in-public-functions branch from 24b646b to 066d747 Compare May 16, 2024 16:39
@mristin mristin merged commit c493f8f into main May 16, 2024
2 checks passed
@mristin mristin deleted the mristin/Return-abstract-errors-in-public-functions branch May 16, 2024 16:42
@impact-merlinzerbe impact-merlinzerbe mentioned this pull request Jun 14, 2024
mristin added a commit that referenced this pull request Jun 19, 2024
This is a patch release concerning the fixes for the bugs revealed in
the field by the pioneer users.

* Ignore attributes prefixed with `xmlns` (#27)
* Fix XML deserialization for over-consumption (#29)
* Return only abstract errors (#30)
@mristin mristin mentioned this pull request Jun 19, 2024
mristin added a commit that referenced this pull request Jun 19, 2024
This is a patch release concerning the fixes for the bugs revealed in
the field by the pioneer users.

* Ignore attributes prefixed with `xmlns` (#27)
* Fix XML deserialization for over-consumption (#29)
* Return only abstract errors (#30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

do not return concrete error types
1 participant