-
Notifications
You must be signed in to change notification settings - Fork 192
Add ApplicationFailure.Builder #2495
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
Add ApplicationFailure.Builder #2495
Conversation
cretz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking
| * | ||
| * <p>Default is {@link ApplicationErrorCategory#UNSPECIFIED}. | ||
| */ | ||
| public Builder setCategory(ApplicationErrorCategory category) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change the getter on ApplicationFailure to getCategory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also be fine changing the setter instead, any preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to the shorter version
| * @param details optional details about the failure. They are serialized using the same approach | ||
| * as arguments and results. | ||
| */ | ||
| public static ApplicationFailure newFailureWithCategory( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this would be a breaking change but this isn't actually released, for any other readers.
| * | ||
| * <p>Default is {@link ApplicationErrorCategory#UNSPECIFIED}. | ||
| */ | ||
| public Builder setCategory(ApplicationErrorCategory category) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to the shorter version
002da02 to
a0ad0fa
Compare
Add
ApplicationFailure.Builderto handle the growing number of options onApplicationFailure