public void onErrorEvent(Connection connection, HttpPacket packet, Throwable error) {
if (accessLoggingEnabled) {
if (packet instanceof HttpRequestPacket) {
final HttpRequestPacket requestPacket = (HttpRequestPacket) packet;
final HttpResponsePacket responsePacket = requestPacket.getResponse();
// 400 should be hardcoded since the response status isn't available for bad requests
responsePacket.setStatus(HttpStatus.BAD_REQUEST_400);
org.glassfish.grizzly.http.server.Request request = org.glassfish.grizzly.http.server.Request.create();
// org.glassfish.grizzly.http.server.Response response = org.glassfish.grizzly.http.server.Response.create();
org.glassfish.grizzly.http.server.Response response = request.getResponse();