Hey,
So basically a business rule is that users can optionally have documents, but it’s acceptable to not have any documents in the JSON payload.
I’m trying to grab a random document and if we find one, then the second doIf() kicks in to request that document
Lines 8-12 here are doing this so far: https://gist.github.com/dragoonis/665343a9ea13eba127416aa8038d1f6f#file-test-scala-L8-L12
When the JSON payload has “documents: []” as an empty array (valid response)`
Line 8 here is causing the error: https://gist.github.com/dragoonis/665343a9ea13eba127416aa8038d1f6f#file-test-scala-L8
What’s the solution here to:
- make it optional to have documents
- choose a random document
Many thanks,
Paul