changed error to a collection of errors to better align with apis that can report multiple errors