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

Magnus Therning magnus at therning.org
Mon Feb 18 20:58:23 UTC 2019

Utku Demir <lists at utdemir.com> writes:

> 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

That's an arguably nicer way than how I solved it; I just removed 
bits causing the error since I didn't need them anyway:


Then I used `stack` to point to my modified version. I wouldn't be
surprised if people on the list already know how, but just in case 
throw in a link to my description of it: 


Magnus Therning              OpenPGP: 0x927912051716CE39
email: magnus at therning.org
twitter: magthe              http://magnus.therning.org/

If you can tell the truth, you don't have to remember anything.
     — Mark Twain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190218/89a8a47b/attachment.sig>

More information about the Haskell-Cafe mailing list