@@ -22,23 +22,18 @@ public void handle(RoutingContext ctx) {
2222 String url = ctx .normalizedPath ();
2323 Throwable t = ctx .failure ();
2424
25- final IAuthorizable profile = AuthMiddleware .getAuthClient (ctx );
26- final OperatorKey operatorKey = profile instanceof OperatorKey ? (OperatorKey ) profile : null ;
27- String participant = "unknown" ;
28- if (operatorKey != null ) {
29- participant = operatorKey .getName ();
30- }
25+ final String contact = AuthMiddleware .getAuthClient (ctx ).getContact ();
3126
3227 if (t != null ) {
3328 // Because Vert.x swallows stack traces so cannot log stack trace
3429 // And we want to ignore HttpClosedException errors as it is (usually) caused by users and no impact
3530 if (t instanceof HttpClosedException ) {
36- LOGGER .warn ("Ignoring exception - URL: [{}], Participant: [{}] - Error:" , url , participant , t );
31+ LOGGER .warn ("Ignoring exception - URL: [{}], Participant: [{}] - Error:" , url , contact , t );
3732 response .end ();
3833 } else if (statusCode >= 500 && statusCode < 600 ) { // 5xx is server error, so error
39- LOGGER .error ("URL: [{}], Participant: [{}] - Error response code: [{}] - Error:" , url , participant , statusCode , t );
34+ LOGGER .error ("URL: [{}], Participant: [{}] - Error response code: [{}] - Error:" , url , contact , statusCode , t );
4035 } else if (statusCode >= 400 && statusCode < 500 ) { // 4xx is user error, so just warn
41- LOGGER .warn ("URL: [{}], Participant: [{}] - Error response code: [{}] - Error:" , url , participant , statusCode , t );
36+ LOGGER .warn ("URL: [{}], Participant: [{}] - Error response code: [{}] - Error:" , url , contact , statusCode , t );
4237 }
4338 }
4439
0 commit comments