Skip to content

Incorrect codec implementation for recently added "date" types #1988

Description

@drewfeelsblue

https://github.com/disneystreaming/smithy4s/blob/series/0.19/modules/json/src/smithy4s/json/internals/SchemaVisitorJCodec.scala#L444

This points to codec impl for smithy4s' LocalDate but seems the same is applicable for all(?) added in 0.19 primitive types. During payload decoding LocalDate.unsafe throws an error (RuntimeException not JsonReaderException) in case of invalid value and as a result it's not caught later/not handled as "usual" (400 as response) payload error.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions