Skip to content

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
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