return result;
}
private SimpleResult onCustomCode(int statusCode, RequestHeader request, String data) throws IOException {
CustomHttpCode customCode = CustomHttpCode.getFromBbCode(statusCode);
ObjectNode result=null;
if (customCode.getType().equals("error")){
result = prepareError(request, data);
}else{
result= prepareOK(statusCode, request, data);
}
result.put("http_code", customCode.getHttpCode());
result.put("bb_code", String.valueOf(customCode.getBbCode()));
return Results.status(customCode.getHttpCode(), result);
}