"}" +
"</style>";
public static void handleRequest(HttpServerExchange exchange, final ServletRequestContext servletRequestContext, final Throwable exception) throws IOException {
HttpServletRequestImpl req = servletRequestContext.getOriginalRequest();
StringBuilder sb = new StringBuilder();
//todo: make this good
sb.append("<html><head><title>ERROR</title>");
sb.append(ERROR_CSS);
sb.append("</head><body><div class=\"header\"><div class=\"error-div\"></div><div class=\"error-text-div\">Error processing request</div></div>");
writeLabel(sb, "Context Path", req.getContextPath());
writeLabel(sb, "Servlet Path", req.getServletPath());
writeLabel(sb, "Path Info", req.getPathInfo());
writeLabel(sb, "Query String", req.getQueryString());
sb.append("<b>Stack Trace</b><br/>");
sb.append(escapeBodyText(exception.toString()));
sb.append("<br/>");
for(StackTraceElement element : exception.getStackTrace()) {
sb.append(escapeBodyText(element.toString()));