Wrap credentials in result instead of throwing an exception - this will break compatibility with older library versions