2024-05-21 14:17:59 +08:00
|
|
|
package com.sf.vertx.handle;
|
|
|
|
|
2024-05-24 18:54:30 +08:00
|
|
|
import com.sf.vertx.enums.GatewayError;
|
|
|
|
import com.sf.vertx.exception.ServiceException;
|
2024-05-31 09:56:02 +08:00
|
|
|
|
2024-05-21 14:17:59 +08:00
|
|
|
import io.vertx.ext.web.RoutingContext;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
@Slf4j
|
2024-05-31 09:56:02 +08:00
|
|
|
public class BodyPreCheckHandlerImpl implements BodyPreCheckHandler {
|
2024-05-21 14:17:59 +08:00
|
|
|
|
2024-05-21 17:39:43 +08:00
|
|
|
@Override
|
2024-05-31 16:15:08 +08:00
|
|
|
public void handle(RoutingContext ctx) {
|
2024-05-21 17:39:43 +08:00
|
|
|
try {
|
|
|
|
} catch (Exception e) {
|
2024-05-31 09:56:02 +08:00
|
|
|
log.error("BodyPreCheckHandlerImpl:",e);
|
2024-05-31 16:15:08 +08:00
|
|
|
ctx.fail(new ServiceException(GatewayError.DEFAULT_SERVICE_ERROR));
|
2024-05-21 17:39:43 +08:00
|
|
|
return;
|
|
|
|
}
|
2024-05-31 16:15:08 +08:00
|
|
|
ctx.next();
|
2024-05-21 17:39:43 +08:00
|
|
|
}
|
2024-05-31 09:56:02 +08:00
|
|
|
}
|