cloudfoundry / cloudfoundry/cf-java-client
Display the code passed to UaaException in UaaException.getMessage()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 334
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the UaaException constructor shown in the issue, then inspect the other concrete subclasses of AbstractCloudFoundryException, including ClientV2Exception, Clientv3Exception, and UnknownCloudFoundryException. Confirm the exception messages expose the status code consistently, with the already-correct classes serving as references, and verify the resulting behavior with the project's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100