You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" aws.smithy.kotlin.runtime.time.ParseException: parse `2022-10-10T16:42:15.344Z`: error at 4: expected `.` found `-`
at aws.smithy.kotlin.runtime.time.ParserCombinatorsKt$char$1.invoke(ParserCombinators.kt:85)
at aws.smithy.kotlin.runtime.time.ParserCombinatorsKt$char$1.invoke(ParserCombinators.kt:82)
at aws.smithy.kotlin.runtime.time.ParserCombinatorsKt$preceded$1.invoke(ParserCombinators.kt:293)
at aws.smithy.kotlin.runtime.time.ParserCombinatorsKt$preceded$1.invoke(ParserCombinators.kt:292)
at aws.smithy.kotlin.runtime.time.ParsersKt.parseEpoch(Parsers.kt:204)
at aws.smithy.kotlin.runtime.time.Instant$Companion.fromEpochSeconds(InstantJVM.kt:122)
at aws.sdk.kotlin.services.pinpoint.transform.JourneyScheduleDocumentDeserializerKt.deserializeJourneyScheduleDocument(JourneyScheduleDocumentDeserializer.kt:37)
at aws.sdk.kotlin.services.pinpoint.transform.JourneyResponseDocumentDeserializerKt.deserializeJourneyResponseDocument(JourneyResponseDocumentDeserializer.kt:96)
at aws.sdk.kotlin.services.pinpoint.transform.JourneyResponsePayloadDeserializerKt.deserializeJourneyResponsePayload(JourneyResponsePayloadDeserializer.kt:10)
at aws.sdk.kotlin.services.pinpoint.transform.CreateJourneyOperationDeserializer.deserialize(CreateJourneyOperationDeserializer.kt:28)
at aws.smithy.kotlin.runtime.http.operation.SdkOperationExecutionKt$decorate$3.invoke(SdkOperationExecution.kt:92)
at aws.smithy.kotlin.runtime.http.operation.SdkOperationExecutionKt$decorate$3.invoke(SdkOperationExecution.kt:92)
at aws.smithy.kotlin.runtime.http.operation.DeserializeHandler.call(SdkOperationExecution.kt:148)
at aws.smithy.kotlin.runtime.http.operation.DeserializeHandler$call$1.invokeSuspend(SdkOperationExecution.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:233)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at foo.ScratchKt.main(Scratch.kt:9)
at foo.ScratchKt.main(Scratch.kt)
Note that the exception message is expecting a number only, not a fully-formatted date/time.
Describe the bug
Smithy models support the
timestampFormat
trait on bothtimestamp
target shapes and member shapes which targettimestamp
shapes. Currently, deserializer codegen only checks the member for thetimestampFormat
trait and ignores the trait on targets. This leads to incorrect serialization of timestamps in some services (e.g., Pinpoint where the target shape uses the trait).Expected Behavior
Codegen should also handle the case of
timestampFormat
on target shapes.Current Behavior
(see above)
Steps to Reproduce
The above code throws the following exception:
Note that the exception message is expecting a number only, not a fully-formatted date/time.
Possible Solution
Fix the bug.
Context
Discovered while attempting to reproduce aws-sdk-kotlin#723.
Your Environment
The text was updated successfully, but these errors were encountered: