Skip to content

Wrap serde failures in a SerdeException instead of leaking Jackson types across the SPI #22

Closed

Description

@OmarAlJarrah

Problem

The serde package declares no exception type (serde/{Serde,Serializer,Deserializer}.kt), so the Jackson adapter throws raw com.fasterxml.jackson.* exceptions across the zero-dep SPI boundary. Callers coding against the SPI can't catch a stable type, and the abstraction leaks its implementation.

Proposed change

Add open class SerdeException(message, cause) : RuntimeException in serde/ (optionally SerializationException/DeserializationException). Catch JsonProcessingException/MismatchedInputException in the Jackson adapter and rethrow as SerdeException. Do not extend the HTTP exception family.

Acceptance

  • Adapter never propagates com.fasterxml.* across the SPI
  • Test: malformed payload surfaces SerdeException
  • apiDump

Priority: high · Effort: small

Activity

  1. added
    enhancement
    sdk-core
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsdk-core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions