You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
Bug Category
Other
Describe the bug
Hello team, would appreciate the help in the following issues
Version: 4.2.2
Add public getters to AuthorizationError AuthorizationSuccessResponse.getErrors() exposes AuthorizationError, but it lacks public accessors.
Could you please provide some getters so we can access AuthorizationError fields? We use them for logging/debugging and mapping the errors to internal representations. Note: getErrors() returned strings in the 3.x versions and we used them for logging, so this represents a regression given that we are losing debugability without the accessors in the newest version.
Override toString in AuthorizationError AuthorizationSuccessResponse.toString() references diagnostics.errors, but given that AuthorizationError doesn't override toString, it returns the memory reference instead of the string representation.
Expected behavior
Being able to access policyId and error within AuthorizationError
Return String representation of diagnostics.errors
Reproduction steps
Tried to access fields within any AuthorizationError instance
Example code and string resulted:
final Diagnostics diagnostics = new Diagnostics(new HashSet<>(reasons), List.of(new AuthorizationError("policy", new DetailedError("message", Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()))));
final AuthorizationSuccessResponse authorizationSuccessResponse = new AuthorizationSuccessResponse(decision, diagnostics);
final String authString = authorizationSuccessResponse.toString();
Code Snippet
// Put your code below this line.
Log output
// Put your output below this line
Additional configuration
No response
Operating System
MacOS
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
Hi thanks for opening this, we agree that these functions should be added. This looks like an oversight when moving from strings to more structured error types. While not strictly a "bug" I'll leave this tagged as such since it is a regression in capability from 3.x, and we want to fix this quickly
Before opening, please confirm:
Bug Category
Other
Describe the bug
Hello team, would appreciate the help in the following issues
Version: 4.2.2
Add public getters to
AuthorizationError
AuthorizationSuccessResponse.getErrors() exposes
AuthorizationError
, but it lacks public accessors.Could you please provide some getters so we can access
AuthorizationError
fields? We use them for logging/debugging and mapping the errors to internal representations.Note: getErrors() returned strings in the 3.x versions and we used them for logging, so this represents a regression given that we are losing debugability without the accessors in the newest version.
Override
toString
inAuthorizationError
AuthorizationSuccessResponse.toString() references
diagnostics.errors
, but given thatAuthorizationError
doesn't overridetoString
, it returns the memory reference instead of the string representation.Expected behavior
policyId
anderror
withinAuthorizationError
diagnostics.errors
Reproduction steps
AuthorizationError
instanceCode Snippet
// Put your code below this line.
Log output
Additional configuration
No response
Operating System
MacOS
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: