aboutsummaryrefslogtreecommitdiff
path: root/central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java
diff options
context:
space:
mode:
Diffstat (limited to 'central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java')
-rw-r--r--central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java b/central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java
index d7c6d9f..a3e2f30 100644
--- a/central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java
+++ b/central/src/main/java/moe/yuuta/dn42peering/portal/HTTPPortalVerticle.java
@@ -9,6 +9,7 @@ import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.common.template.TemplateEngine;
import io.vertx.ext.web.templ.freemarker.FreeMarkerTemplateEngine;
+import io.vertx.serviceproxy.ServiceException;
import moe.yuuta.dn42peering.admin.AdminHandler;
import moe.yuuta.dn42peering.asn.ASNHandler;
import moe.yuuta.dn42peering.manage.ManageHandler;
@@ -44,6 +45,15 @@ public class HTTPPortalVerticle extends AbstractVerticle {
ctx.response().setStatusCode(((HTTPException) ctx.failure()).code).end();
return;
}
+ if(ctx.failure() instanceof ServiceException) {
+ final JsonObject debugInfo = ((ServiceException) ctx.failure()).getDebugInfo();
+ if(debugInfo != null) {
+ logger.error("Generic Error: " + debugInfo.encodePrettily(), ctx.failure());
+ } else {
+ logger.error("Generic Error: No debug info available.", ctx.failure());
+ }
+ return;
+ }
logger.error("Generic Error", ctx.failure());
});
vertx.createHttpServer()