From 10dd890cba50e1593a3fbe574b83e9b3bfa4d982 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Tue, 15 Jul 2025 14:32:13 +1000 Subject: [PATCH 1/2] Log participant name --- .../uid2/core/handler/GenericFailureHandler.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/uid2/core/handler/GenericFailureHandler.java b/src/main/java/com/uid2/core/handler/GenericFailureHandler.java index 24a5fb79..3176ff2f 100644 --- a/src/main/java/com/uid2/core/handler/GenericFailureHandler.java +++ b/src/main/java/com/uid2/core/handler/GenericFailureHandler.java @@ -1,5 +1,8 @@ package com.uid2.core.handler; +import com.uid2.shared.auth.IAuthorizable; +import com.uid2.shared.auth.OperatorKey; +import com.uid2.shared.middleware.AuthMiddleware; import io.vertx.core.Handler; import io.vertx.core.http.HttpClosedException; import io.vertx.core.http.HttpServerResponse; @@ -19,11 +22,18 @@ public void handle(RoutingContext ctx) { String url = ctx.normalizedPath(); Throwable t = ctx.failure(); + final IAuthorizable profile = AuthMiddleware.getAuthClient(ctx); + final OperatorKey operatorKey = profile instanceof OperatorKey ? (OperatorKey) profile : null; + String participant = "unknown"; + if (operatorKey != null) { + participant = operatorKey.getName(); + } + if (t != null) { if (statusCode >= 500 && statusCode < 600) { // 5xx is server error, so error - LOGGER.error("URL: [{}] - Error response code: [{}] - Error:", url, statusCode, t); + LOGGER.error("URL: [{}], Participant: [{}] - Error response code: [{}] - Error:", url, participant, statusCode, t); } else if (statusCode >= 400 && statusCode < 500) { // 4xx is user error, so just warn - LOGGER.warn("URL: [{}] - Error response code: [{}] - Error:", url, statusCode, t); + LOGGER.warn("URL: [{}], Participant: [{}] - Error response code: [{}] - Error:", url, participant, statusCode, t); } } From 0151f90c31751c5a564d867e73bc7db2bee2fa03 Mon Sep 17 00:00:00 2001 From: Release Workflow Date: Tue, 15 Jul 2025 21:57:47 +0000 Subject: [PATCH 2/2] [CI Pipeline] Released Snapshot version: 2.30.20-alpha-153-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b58d57e7..5b624e1e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.uid2 uid2-core - 2.30.19 + 2.30.20-alpha-153-SNAPSHOT UTF-8