Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample REST endpoint with non 200 response and no Exception
public Survey findSurvey(@PathVariable String surveyId, HttpServletResponse response) {"Querying survey {}", surveyId);
Survey survey = repository.get(surveyId);
if (survey == null) {
log.warn("Survey {} was not found!", surveyId);
return survey;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment