cf-java-client icon indicating copy to clipboard operation
cf-java-client copied to clipboard

Display the code passed to UaaException in UaaException.getMessage()

Open odupuy opened this issue 6 years ago • 1 comments
trafficstars

Make the logging more informative for the developer. Change simply the code from

    public UaaException(Integer statusCode, String error, String errorDescription) {
        super(statusCode, String.format("%s: %s", error, errorDescription));
        this.error = error;
        ...

to

    public UaaException(Integer statusCode, String error, String errorDescription) {
        super(statusCode, String.format("%s: %s [%s]", error, errorDescription, statusCode));
        this.error = error;
        ...

This will avoid painful debugging and work around.

Do the same for the other concrete classes extending AbstractCloudFoundryException aka ClientV2Exception (seems good), Clientv3Exception (seems good), UnknownCloudFoundryException (to fix)

odupuy avatar Jul 17 '19 21:07 odupuy

Seems reasonable. Marking as an enhancement.

dmikusa avatar Jan 18 '22 19:01 dmikusa