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

fix: update GoogleJsonError object to accomodate all fields in Invalid parameter exception #1783

Merged
merged 3 commits into from May 7, 2021

Conversation

Neenu1995
Copy link
Contributor

@Neenu1995 Neenu1995 commented May 4, 2021

Fixes b/185405327

Invalid parameter error message does not contain details about which parameter is the invalid one. These fields have been added to GoogleJsonError object.

@Neenu1995 Neenu1995 requested a review from as a code owner May 4, 2021
@google-cla google-cla bot added the cla: yes label May 4, 2021
}

public List<ParameterViolations> getParameterViolations() {
return parameterViolations;
Copy link
Collaborator

@elharo elharo May 4, 2021

Choose a reason for hiding this comment

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

exposes mutable private state, needs a defensive copy

return parameterViolations;
}

public void setParameterViolations(List<ParameterViolations> parameterViolations) {
Copy link
Collaborator

@elharo elharo May 4, 2021

Choose a reason for hiding this comment

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

exposes mutable private state

return details;
}

public void setDetails(List<Details> details) {
Copy link
Collaborator

@elharo elharo May 4, 2021

Choose a reason for hiding this comment

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

exposes mutable private state

@@ -246,6 +302,14 @@ public final void setMessage(String message) {
this.message = message;
}

public List<Details> getDetails() {
Copy link
Collaborator

@elharo elharo May 4, 2021

Choose a reason for hiding this comment

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

exposes mutable private state

@Neenu1995 Neenu1995 requested a review from elharo May 6, 2021
elharo
elharo approved these changes May 7, 2021
@Neenu1995 Neenu1995 added the automerge label May 7, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 94c4570 into master May 7, 2021
13 checks passed
@gcf-merge-on-green gcf-merge-on-green bot deleted the fix-google-json-error branch May 7, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge label May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants