Skip to content

Instantly share code, notes, and snippets.

@Raouf25
Created April 24, 2020 17:10
Show Gist options
  • Save Raouf25/9db5b3f93e38f5293a2015ce0e69f504 to your computer and use it in GitHub Desktop.
Save Raouf25/9db5b3f93e38f5293a2015ce0e69f504 to your computer and use it in GitHub Desktop.
public Agreement getById(Integer id) throws BackendException {
try {
AgreementDto agreementDto = this.agreementClientService.get(id);
return mapper.map(agreementDto, Agreement.class);
} catch (ResourceAccessException e) {
throw new CatalogClientUnavailableException();
} catch (CatalogException e) {
throw new ResourceNotFoundException(id, "Agreement");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment