use of com.netflix.spinnaker.kork.web.exceptions.HasAdditionalAttributes in project kork by spinnaker.
the class GenericErrorController method error.
@RequestMapping(value = "/error")
public Map error(@RequestParam(value = "trace", defaultValue = "false") Boolean includeStackTrace, HttpServletRequest httpServletRequest) {
ServletRequestAttributes servletRequestAttributes = new ServletRequestAttributes(httpServletRequest);
Map<String, Object> attributes = errorAttributes.getErrorAttributes(servletRequestAttributes, includeStackTrace);
Throwable exception = errorAttributes.getError(servletRequestAttributes);
if (exception != null && exception instanceof HasAdditionalAttributes) {
attributes.putAll(((HasAdditionalAttributes) exception).getAdditionalAttributes());
}
return attributes;
}
Aggregations