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

Fix null body response to 404 #301

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

arybakov-cgi
Copy link
Contributor

No description provided.

public EquivalentOrChallengeCode getEquivalentOrChallengeCode(String equivalentOrChallengeCode) {
return equivalentOrChallengeCodeTransformer.transformToDTO(equivalentOrChallengeCodeRepository.findById(equivalentOrChallengeCode));
public EquivalentOrChallengeCode getEquivalentOrChallengeCode(String equivalentOrChallengeCode) throws EntityNotFoundException {
EquivalentOrChallengeCode result = equivalentOrChallengeCodeTransformer.transformToDTO(equivalentOrChallengeCodeRepository.findById(equivalentOrChallengeCode));
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @arybakov-cgi looking way better, but to clarify, Transformer should not check if entity is present, it should only be concerned with transforming an entity. Please check if entity is present here in the service, if present, pass the entity to the transformer, not the optional. Then we should be good. Thanks!

Copy link

@arybakov-cgi arybakov-cgi merged commit b562f7b into grad-release Jun 14, 2024
3 checks passed
@arybakov-cgi arybakov-cgi deleted the develop/alex-GRAD2-2626-2627-2628 branch June 14, 2024 21:06
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