guardian / facia-scala-client

Low level client for the Facia JSON API
Other
2 stars 1 forks source link

Ignore snaps with bad links, rather than throwing #250

Closed jonathonherbert closed 3 years ago

jonathonherbert commented 3 years ago

What does this change?

An attempt at a fix for #249. See that issue for details.

Dev notes

Because the failure to parse the URL only occurs when we're attempting to recover the 'branding' for the snapLink (which I don't fully understand, but IIUC cannot possibly function with an invalid link!), I think we're safe to just move on and continue parsing the rest of the response. Hence we log this error, but convert to an option and continue – if anyone knows better, please say!

How to test

jonathonherbert commented 3 years ago

Tested w/ @frankie297, looks good on MAPI 👍