theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
269 stars 48 forks source link

Don't double-encode standalone JSON errors #103

Closed rimmington closed 3 years ago

rimmington commented 3 years ago

Return the JSON-encoded error type instead of double-encoding it in a string in the standalone case. This lets the user specify errorType, errorMessage etc. as per the "standard AWS Lambda error format".

This also has the effect of using the potentially-faster toEncoding Aeson method if a user's type implements it.

dnikolovv commented 3 years ago

@NickSeagull Looks good to me!

NickSeagull commented 3 years ago

Thanks a lot for this! This has been published as version 4.1.1 in Hackage