Change ErrorUtils#respondInternalError to print the error + request info with slf4j
This commit is contained in:
parent
043bc76cd3
commit
de9a490aa1
@ -3,8 +3,10 @@ package net.frozenorb.apiv3.util;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.frozenorb.apiv3.APIv3;
|
||||
|
||||
@Slf4j
|
||||
@UtilityClass
|
||||
public class ErrorUtils {
|
||||
|
||||
@ -21,7 +23,7 @@ public class ErrorUtils {
|
||||
}
|
||||
|
||||
public static void respondInternalError(RoutingContext ctx, Throwable error) {
|
||||
error.printStackTrace();
|
||||
log.error("Request \"" + ctx.request().method().name() + " " + ctx.request().path() + "\" failed.", error);
|
||||
respondGeneric(ctx, 500, "Internal error: " + error.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user