lambda-local icon indicating copy to clipboard operation
lambda-local copied to clipboard

"Expected object, received string" for queryStringParameters

Open ferdy-roz opened this issue 1 year ago • 0 comments

Hi, I have a bit of a hacked together usecase where I am using ts-rest to handle api definitions + request/response parsing and then lambda-local to try and hit that endpoint during development.

I get the following zod errors when using lambda-local and calling a GET endpoint with a nested object:

"Expected object, received string"

It seems like whatever lambda-local is doing under the hood to turn my request into a queryStringParameters that the aws event expects, nested objects get turned into strings?

Let me know if I'm just doing something silly somewhere. I can provide more code if needed.

ferdy-roz avatar Apr 26 '24 16:04 ferdy-roz