carpe / scalambda

Toolkit for building/deploying Lambda Functions with SBT
https://carpe.github.io/scalambda/docs/
41 stars 6 forks source link

String input type raises: Failed to parse input. io.circe.DecodingFailure$$anon$2: String #50

Open bneijt opened 3 years ago

bneijt commented 3 years ago

The HelloWorld example from https://carpe.github.io/scalambda/docs/writing-functions/ seems to suggest that you can have a plain string as input type for handleRequest. However, when I try that, I get: Failed to parse input. io.circe.DecodingFailure$$anon$2: String.

Reading at https://github.com/carpe/scalambda/blob/3f52f10078b94337c823c3857549000d5af1d598/core/src/main/scala/io/carpe/scalambda/Scalambda.scala#L40 seems to suggest that it will always try to decode the incoming string, which would make the HelloWorld example impossible?

SwiftEngineer commented 3 years ago

That's odd... You should actually be able to have the function take in a string as in input just fine.

Are you sure you provided a valid string to the function when you invoked it?