Skip to content

Commit

Permalink
Compile the codec before building the function
Browse files Browse the repository at this point in the history
  • Loading branch information
daddykotex committed Nov 10, 2022
1 parent f2b721f commit d1b21f0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ private[http4s] class SmithyHttp4sServerEndpointImpl[F[_], Op[_, _, _, _, _], I,
case None =>
// NB : only compiling the input codec if the data cannot be
// totally extracted from the metadata.
implicit val inputCodec =
entityCompiler.compilePartialEntityDecoder(inputSchema, entityCache)
(metadata, request) =>
implicit val inputCodec =
entityCompiler.compilePartialEntityDecoder(inputSchema, entityCache)
for {
metadataPartial <- inputMetadataDecoder.decode(metadata).liftTo[F]
bodyPartial <- request.as[BodyPartial[I]]
Expand Down

0 comments on commit d1b21f0

Please sign in to comment.