scala-kit icon indicating copy to clipboard operation
scala-kit copied to clipboard

List of DocumentLink with at least one broken link returns None

Open rguilbault opened this issue 6 years ago • 1 comments

Hi,

In a document, I have the following structure :

  • a fragment XXX of type Group
    • for each document inside the group, a unique fragment, called YYY, with a DocumentLink.

If in this group, I have at least one DocumentLink which is broken, the fragment XXX returns None, and not Some(Group(List(...))). Is this the expected behaviour ?

Tested on scala 2.11, prismic-kit 2.4.2

Thank you !

Ronan

rguilbault avatar Jun 25 '18 15:06 rguilbault

Ok, I think I founded the bug :

  • When a DocumentLink is broken, the lang attribute is a null
  • However, in PrismicJsonProtocol.scala, it try to convert JsNull spray library to a String... which is apparently not possible.

rguilbault avatar Jun 26 '18 16:06 rguilbault