-
Notifications
You must be signed in to change notification settings - Fork 123
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
Prefer to wrap third party errors #243
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Steve Coffman <steve@khanacademy.org>
github-merge-queue bot
referenced
this pull request
in infratographer/x
Jul 14, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/vektah/gqlparser/v2](https://togithub.com/vektah/gqlparser) | require | patch | `v2.5.1` -> `v2.5.6` | --- ### Release Notes <details> <summary>vektah/gqlparser (github.com/vektah/gqlparser/v2)</summary> ### [`v2.5.6`](https://togithub.com/vektah/gqlparser/releases/tag/v2.5.6) [Compare Source](https://togithub.com/vektah/gqlparser/compare/v2.5.5...v2.5.6) #### What's Changed - feat: support end of definition comment and end of file comment by [@​Warashi](https://togithub.com/Warashi) in [https://github.com/vektah/gqlparser/pull/264](https://togithub.com/vektah/gqlparser/pull/264) - feat(formatter): preserve spaces at the head of comments by [@​Warashi](https://togithub.com/Warashi) in [https://github.com/vektah/gqlparser/pull/265](https://togithub.com/vektah/gqlparser/pull/265) **Full Changelog**: vektah/gqlparser@v2.5.5...v2.5.6 ### [`v2.5.5`](https://togithub.com/vektah/gqlparser/releases/tag/v2.5.5) [Compare Source](https://togithub.com/vektah/gqlparser/compare/v2.5.4...v2.5.5) #### What's Changed - feat: format with comments by [@​Warashi](https://togithub.com/Warashi) in [https://github.com/vektah/gqlparser/pull/263](https://togithub.com/vektah/gqlparser/pull/263) **Full Changelog**: vektah/gqlparser@v2.5.4...v2.5.5 ### [`v2.5.4`](https://togithub.com/vektah/gqlparser/releases/tag/v2.5.4) [Compare Source](https://togithub.com/vektah/gqlparser/compare/v2.5.3...v2.5.4) #### What's Changed - feat(lexer): comment token support by [@​Warashi](https://togithub.com/Warashi) in [https://github.com/vektah/gqlparser/pull/261](https://togithub.com/vektah/gqlparser/pull/261) #### New Contributors - [@​Warashi](https://togithub.com/Warashi) made their first contribution in [https://github.com/vektah/gqlparser/pull/261](https://togithub.com/vektah/gqlparser/pull/261) **Full Changelog**: vektah/gqlparser@v2.5.3...v2.5.4 ### [`v2.5.3`](https://togithub.com/vektah/gqlparser/releases/tag/v2.5.3) [Compare Source](https://togithub.com/vektah/gqlparser/compare/v2.5.2...v2.5.3) #### What's Changed - Update modules by [@​StevenACoffman](https://togithub.com/StevenACoffman) in [https://github.com/vektah/gqlparser/pull/259](https://togithub.com/vektah/gqlparser/pull/259) **Full Changelog**: vektah/gqlparser@v2.5.2...v2.5.3 ### [`v2.5.2`](https://togithub.com/vektah/gqlparser/releases/tag/v2.5.2) [Compare Source](https://togithub.com/vektah/gqlparser/compare/v2.5.1...v2.5.2) #### What's Changed - Add github actions to lint by [@​StevenACoffman](https://togithub.com/StevenACoffman) in [https://github.com/vektah/gqlparser/pull/241](https://togithub.com/vektah/gqlparser/pull/241) - GH Actions CI Additions + Linter fixups by [@​philipaconrad](https://togithub.com/philipaconrad) in [https://github.com/vektah/gqlparser/pull/242](https://togithub.com/vektah/gqlparser/pull/242) - Prefer to wrap third party errors by [@​StevenACoffman](https://togithub.com/StevenACoffman) in [https://github.com/vektah/gqlparser/pull/243](https://togithub.com/vektah/gqlparser/pull/243) - Remove a duplicate line in lexer_test.yml by [@​ryicoh](https://togithub.com/ryicoh) in [https://github.com/vektah/gqlparser/pull/244](https://togithub.com/vektah/gqlparser/pull/244) - Point to the right GraphQL spec by [@​Khyme](https://togithub.com/Khyme) in [https://github.com/vektah/gqlparser/pull/250](https://togithub.com/vektah/gqlparser/pull/250) - Bump json5 from 2.2.0 to 2.2.3 in /validator/imported by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/vektah/gqlparser/pull/251](https://togithub.com/vektah/gqlparser/pull/251) - support [@​defer](https://togithub.com/defer) directive by [@​fiatjaf](https://togithub.com/fiatjaf) in [https://github.com/vektah/gqlparser/pull/255](https://togithub.com/vektah/gqlparser/pull/255) - Don't drop repeatable keyword when formatting directive by [@​tadeokondrak](https://togithub.com/tadeokondrak) in [https://github.com/vektah/gqlparser/pull/256](https://togithub.com/vektah/gqlparser/pull/256) - Validate directive arguments during schema parsing by [@​fredzqm](https://togithub.com/fredzqm) in [https://github.com/vektah/gqlparser/pull/258](https://togithub.com/vektah/gqlparser/pull/258) - Validate enum values directive are legit by [@​fredzqm](https://togithub.com/fredzqm) in [https://github.com/vektah/gqlparser/pull/257](https://togithub.com/vektah/gqlparser/pull/257) #### New Contributors - [@​ryicoh](https://togithub.com/ryicoh) made their first contribution in [https://github.com/vektah/gqlparser/pull/244](https://togithub.com/vektah/gqlparser/pull/244) - [@​Khyme](https://togithub.com/Khyme) made their first contribution in [https://github.com/vektah/gqlparser/pull/250](https://togithub.com/vektah/gqlparser/pull/250) - [@​fiatjaf](https://togithub.com/fiatjaf) made their first contribution in [https://github.com/vektah/gqlparser/pull/255](https://togithub.com/vektah/gqlparser/pull/255) - [@​tadeokondrak](https://togithub.com/tadeokondrak) made their first contribution in [https://github.com/vektah/gqlparser/pull/256](https://togithub.com/vektah/gqlparser/pull/256) - [@​fredzqm](https://togithub.com/fredzqm) made their first contribution in [https://github.com/vektah/gqlparser/pull/258](https://togithub.com/vektah/gqlparser/pull/258) **Full Changelog**: vektah/gqlparser@v2.5.1...v2.5.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/infratographer/x). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM1LjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to #234 the method signature returned
*gqlerror.Error
which would return a typed nil, so that:would fail to detect errors.
Consumers of this library when the method signature returned
*gqlerror.Error
would frequently do this:Now that the method signature is to return the
error
interface the first one worked, and the second one no longer does (as it is now always untyped nil). 😞Similarly, others consumers assume the
error
interface we return can always be asserted as(*gqlerror.Error)
which is not entirely true, as we have some third-party errors which we return without wrapping.This wraps a few of the most common calls to be able to be asserted as
*gqlerror.Error
without changing the return signature. However, there are a number of third-party errors we cannot easily wrap at the point of origination because it would cause cyclical dependencies.I ran wrapcheck configured to ignore this package and found:
Signed-off-by: Steve Coffman steve@khanacademy.org
Describe your PR and link to any relevant issues.
I have: