embabel-agent icon indicating copy to clipboard operation
embabel-agent copied to clipboard

Alert user by throwing exception on infra jackson deserialization errors

Open igordayen opened this issue 3 months ago • 1 comments

Overview

Closes #1870

LlmOperationsCommon.kt

  • MismatchedInputException branch precedes is DatabindException in the when — Kotlin evaluates top-to-bottom, so retryable missing-field errors still return MaybeReturn.failure, never hit the rethrow.
  • is DatabindException -> throw propagates infra errors (wrong annotation, type narrowing) out of the deserializer.
  • Normal LLM decline path — unaffected.

LlmDataBindingProperties.kt

  • Cause-chain walk in onError: reaches DatabindException, throws to abort after 1 attempt.
  • MismatchedInputException excluded — missing-field retries continue normally.
  • retryCount >= maxAttempts guard in close() — "Maximum attempts reached" log is now accurate.

SpringAiRetryPolicy.kt

  • Same cause-chain walk in canRetry() — returns false immediately when DatabindException is found, stopping the outer action-level retry after 1 attempt.
  • MismatchedInputException excluded consistently.

igordayen avatar Aug 05 '26 20:08 igordayen