Implement Is and As for mongo errors

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Came up in a recent slack conversation. We should implement Is or As for our custom errors to return true if any of the contained errors match the given error. Other popular drivers seem to follow this pattern to allow users to call errors.Is and errors.As on their custom errors.

      For each error in mongo/errors.go, implement Is to check all possible contained error strings and implement As to cast to any contained error type.

            Assignee:
            Unassigned
            Reporter:
            Benji Rewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: