NIHVIVO-1462 Handle requests for non-existent individuals
This commit is contained in:
parent
bc2a2dbc1a
commit
46a17a9c46
3 changed files with 8 additions and 8 deletions
|
@ -660,7 +660,7 @@ public class IndividualController extends FreemarkerHttpServlet {
|
||||||
body.put("title","Individual Not Found");
|
body.put("title","Individual Not Found");
|
||||||
body.put("errorMessage", "The individual was not found in the system.");
|
body.put("errorMessage", "The individual was not found in the system.");
|
||||||
|
|
||||||
return new TemplateResponseValues(Template.TITLED_ERROR_MESSAGE.toString(), body, HttpServletResponse.SC_NOT_FOUND);
|
return new TemplateResponseValues(Template.TITLED_ERROR_MESSAGE.toString(), body);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- Standard template to display an error message with a title, generated from any controller. Keeps this out of individual templates. -->
|
||||||
|
|
||||||
|
<h2>${title}</h2>
|
||||||
|
|
||||||
|
<#include "error-message.ftl">
|
|
@ -1,7 +0,0 @@
|
||||||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
|
||||||
|
|
||||||
<#-- Standard template to display an error message generated from any controller. Keeps this out of individual templates. -->
|
|
||||||
|
|
||||||
<h2>${title}</h2>
|
|
||||||
|
|
||||||
<#include "errorMessage.ftl">
|
|
Loading…
Add table
Reference in a new issue