Uploaded image for project: 'Scala'
  1. Scala
  2. SCALA-319

Improve error messages when decoding arrays or documents

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: bson
    • Labels:
      None
    • Sprint:
      JVM Sprint 40

      Description

      See https://stackoverflow.com/questions/44627621/use-mongo-scala-driver-macros-to-read-documents-with-additional-nested-fields

      When encountering an unexpected List or Document when decoding data it throws a:

      java.util.NoSuchElementException: head of empty list

      The typeArgs list should be inspected to ensure it is the expected datatype and a bson exception should be thrown.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: