Skip to content

fix: lower ArcAgentClient error log to debug and preserve cause#367

Open
sam-hey wants to merge 1 commit into
eclipse-lmos:mainfrom
sam-hey:fix/arc-agent-client-log-level
Open

fix: lower ArcAgentClient error log to debug and preserve cause#367
sam-hey wants to merge 1 commit into
eclipse-lmos:mainfrom
sam-hey:fix/arc-agent-client-log-level

Conversation

@sam-hey

@sam-hey sam-hey commented Jul 23, 2026

Copy link
Copy Markdown

Problem

ArcAgentClientService.askAgent logs failed agent responses at ERROR with a full stacktrace, even for expected agent failures (an agent that cannot answer). This produces noisy error logs for a condition that callers already handle via AgentClientException. It also drops the original cause when rethrowing (AgentClientException(e.message)), losing context.

Change

  • Log the caught exception at DEBUG instead of ERROR.
  • Preserve the original cause: throw AgentClientException(e.message, e).
  • Add a failure-path unit test asserting AgentClientException is thrown and its cause is the original exception.

askAgent logged failed agent responses at ERROR with a full stacktrace even for expected agent failures, and dropped the original cause when rethrowing. Log at DEBUG instead and pass the cause into AgentClientException. Add a failure-path test asserting AgentClientException is thrown and the cause is preserved.

Signed-off-by: Sam Heymann <sam.heymann@telekom.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant