如果异步结果失败,vertx 超时

vertx timeout if async result is failed

当服务器端服务以失败结果结束时,我在浏览器中看到超时。如果服务调用成功,一切正常,但如果调用失败,浏览器似乎永远不会收到响应。

我的服务将结果处理程序传递给包含以下代码的 DAO:

final SQLConnection conn = ar.result();
conn.updateWithParams(INSERT_SQL, params, insertAsyncResult -> {

    if (insertAsyncResult.failed()) {
        conn.close();
        resultHandler.handle(ServiceException.fail(1, "TODO"));
    } else {
        resultHandler.handle(Future.succeededFuture());
    }

});

我不确定从这里到哪里去。如何调试框架发送回客户端的内容?

问题是我需要在中间 Verticle 中注册一个 ServiceExceptionMessageCodec,它位于浏览器和执行数据库操作的 Verticle 之间。