Invalid URIs in credentials should not raise exceptions

Previously an invalid URI (e.g. a git URI) would cause errors even
though these can be perfectly valid for non-database services

[#62574080]
handle invalid URLs with valid schemes