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

Add message to api exception and update JavaDocs for error codes #60

Merged

Conversation

alexanderjordanbaker
Copy link
Collaborator

No description provided.

@alexanderjordanbaker alexanderjordanbaker force-pushed the AddMessageToApiError branch 2 times, most recently from 9e6ebd3 to dfc6beb Compare December 12, 2023 02:16
}

public int getHttpStatusCode() {
return httpStatusCode;
}

public APIError getApiError() {
return apiError != null ? APIError.fetchErrorResponseFromErrorCode(apiError) : null;
return apiErrorCode != null ? APIError.fetchErrorResponseFromErrorCode(apiErrorCode) : null;
}

public Long getRawApiError() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest renaming to getRawApiErrorCode or just getApiErrorCode

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is getting the raw apiError enum, hence the name

}

@Override
public String toString() {
return "APIException{" +
"httpStatusCode=" + httpStatusCode +
", apiError=" + apiError +
"} " + super.toString();
", apiError=" + apiErrorCode +
Copy link
Collaborator

Choose a reason for hiding this comment

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

apiError -> apiErrorCode

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The public name for this field is apiError

Add JavaDocs for the error codes
@alexanderjordanbaker alexanderjordanbaker merged commit 144cac8 into apple:main Dec 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants