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

feat: parse details information from REST errors #815

Conversation

viacheslav-rostovtsev
Copy link
Member

No description provided.

@viacheslav-rostovtsev viacheslav-rostovtsev marked this pull request as ready for review September 9, 2022 01:03
@viacheslav-rostovtsev viacheslav-rostovtsev requested a review from a team as a code owner September 9, 2022 01:03
@viacheslav-rostovtsev
Copy link
Member Author

Fixed the comments, please TAL

gapic-common/lib/gapic/rest/error.rb Show resolved Hide resolved
gapic-common/lib/gapic/rest/error.rb Outdated Show resolved Hide resolved
code = body["error"]["code"]
unless body.is_a?(::Hash) && body&.key?("error") && body["error"].is_a?(::Hash)
return [nil, nil, nil,
nil]
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I guess I wasn't clear enough on the nit. The array doesn't need to be split across two lines. 🙂

gapic-common/lib/gapic/rest/error.rb Outdated Show resolved Hide resolved
gapic-common/lib/gapic/rest/error.rb Outdated Show resolved Hide resolved
@viacheslav-rostovtsev
Copy link
Member Author

Fixed, please TAL

code = body["error"]["code"]
unless body.is_a?(::Hash) && body&.key?("error") && body["error"].is_a?(::Hash)
return [nil, nil, nil,
nil]
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I guess I wasn't clear enough on the nit. The array doesn't need to be split across two lines. 🙂

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.

None yet

2 participants