diff --git a/src/py/flwr/client/app.py b/src/py/flwr/client/app.py index 4fa74b206156..ac20329927aa 100644 --- a/src/py/flwr/client/app.py +++ b/src/py/flwr/client/app.py @@ -495,10 +495,10 @@ def _load_client_app() -> ClientApp: # Execute ClientApp reply_message = client_app(message=message, context=context) except Exception as ex: # pylint: disable=broad-exception-caught - log(ERROR, "SuperNode raised an exception", exc_info=ex) # Legacy grpc-bidi if transport in ["grpc-bidi", None]: + log(ERROR, "Client raised an exception.", exc_info=ex) # Raise exception, crash process raise ex @@ -507,12 +507,16 @@ def _load_client_app() -> ClientApp: e_code = ErrorCode.CLIENT_APP_RAISED_EXCEPTION # Reason example: ":<'division by zero'>" reason = str(type(ex)) + ":<'" + str(ex) + "'>" + exc_entity = "ClientApp" if isinstance(ex, LoadClientAppError): reason = ( "An exception was raised when attempting to load " "the ClientApp module" ) e_code = ErrorCode.LOAD_CLIENT_APP_EXCEPTION + exc_entity = "SuperNode" + + log(ERROR, "%s raised an exception", exc_entity, exc_info=ex) # Create error message reply_message = message.create_error_reply(