[Haskell-cafe] Amazonka: is it possible to work around deserialisation bug?

Utku Demir lists at utdemir.com
Mon Feb 11 20:07:07 UTC 2019


Hey,

I had a similar problem before, my workaround was creating a newtype wrapper around the original request and implementing 'AWSRequest' instance by hand. That let me override the way response is parsed.

I dug up the code, the override is here: https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/AWS/Lambda/Invoke/Fixed.hs
And here is how I sent the request: https://github.com/utdemir/distributed-fork/blob/edadea209e7e1fda77ca1d37011734771f6559de/serverless-execute-aws-lambda/src/Network/Serverless/Execute/Lambda/Internal/Invoke.hs#L78

Hope it helps,
Utku

On Sat, Feb 9, 2019, at 10:11 PM, Magnus Therning wrote:
> 
> I just created issue #517 on Amazonka [^1] which got me thinking.
> 
> Is my only option to wait for the bug to be fixed or can I hack my 
> way
> around it?
> 
> I looked around in the documentation for Amazonka a bit but failed 
> to
> find some obvious way to hack together a "send this request but 
> give me
> the response in JSON". Which is why I'm trying my luck here. I 
> suspect
> I'm not the first Amazonka user to find myself in this situation, 
> so
> hopefully someone's got a solution already.
> 
> /M
> 
> [^1]: https://github.com/brendanhay/amazonka/issues/517
> 
> --
> Magnus Therning OpenPGP: 0x927912051716CE39
> email: magnus at therning.org
> twitter: magthe http://magnus.therning.org/
> 
> Computers are useless. They can only give you answers.
>  — Pablo Picasso
> 
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
> 
> *Attachments:*
>  * signature.asc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190211/c666c48f/attachment.html>


More information about the Haskell-Cafe mailing list