这是indexloc提供的服务,不要输入任何密码
Skip to content

Add support for FORBIDDEN GraphQL responses and simplify errors. #533

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

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

calebbrown
Copy link
Contributor

@calebbrown calebbrown commented Feb 1, 2024

Handle {type: "FORBIDDEN"} GitHub GraphQL error responses that are returned when the App based authentication fails to access a repository due to GitHub org restrictions.

This change also simplifies some of the error handling, especially with multi-wrapped errors available in later versions of Go.

…ing.

Handle {type: "FORBIDDEN"} GitHub GraphQL error responses that are returned
when the App based authentication fails to access a repository due to
GitHub org restrictions.

Go 1.21 now supports wrapping multiple errors. This change makes use of
that feature some more too.

Signed-off-by: Caleb Brown <calebbrown@google.com>
@calebbrown calebbrown marked this pull request as draft February 1, 2024 07:01
Signed-off-by: Caleb Brown <calebbrown@google.com>
@calebbrown calebbrown changed the title Add support for FORBIDDEN GraphQL responses and use multi error wrapping. Add support for FORBIDDEN GraphQL responses and simplify errors. Feb 1, 2024
@calebbrown calebbrown marked this pull request as ready for review February 1, 2024 20:49
@calebbrown calebbrown merged commit 06c99dc into main Feb 2, 2024
@calebbrown calebbrown deleted the handle_forbidden_repo branch February 2, 2024 00:51
calebbrown added a commit that referenced this pull request Feb 14, 2024
* Add support for FORBIDDEN GraphQL responses and use multi error wrapping.

Handle {type: "FORBIDDEN"} GitHub GraphQL error responses that are returned
when the App based authentication fails to access a repository due to
GitHub org restrictions.

Go 1.21 now supports wrapping multiple errors. This change makes use of
that feature some more too.

Signed-off-by: Caleb Brown <calebbrown@google.com>

* Remove multi-wrapped errors because we're on Go 1.19.

Signed-off-by: Caleb Brown <calebbrown@google.com>

---------

Signed-off-by: Caleb Brown <calebbrown@google.com>
calebbrown added a commit that referenced this pull request Feb 14, 2024
* Bump Go version to 1.21.

- update go.mod, go.work files
- update workflows
- replace exp slices for std lib

Signed-off-by: Caleb Brown <calebbrown@google.com>

* Add support for FORBIDDEN GraphQL responses and simplify errors. (#533)

* Add support for FORBIDDEN GraphQL responses and use multi error wrapping.

Handle {type: "FORBIDDEN"} GitHub GraphQL error responses that are returned
when the App based authentication fails to access a repository due to
GitHub org restrictions.

Go 1.21 now supports wrapping multiple errors. This change makes use of
that feature some more too.

Signed-off-by: Caleb Brown <calebbrown@google.com>

* Remove multi-wrapped errors because we're on Go 1.19.

Signed-off-by: Caleb Brown <calebbrown@google.com>

---------

Signed-off-by: Caleb Brown <calebbrown@google.com>

* Bump Dockerfile versions to 1.21.7.

Signed-off-by: Caleb Brown <calebbrown@google.com>

* Add version tag to docker images.

Signed-off-by: Caleb Brown <calebbrown@google.com>

---------

Signed-off-by: Caleb Brown <calebbrown@google.com>
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.

2 participants