mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39:28 -07:00
Improve error message
This commit is contained in:
parent
b03eebc0dc
commit
f49e9029e9
2 changed files with 3 additions and 3 deletions
|
@ -159,7 +159,7 @@ const verify = async (input, fingerprint, opts) => {
|
|||
opts = mergeOptions(defaultOpts, opts ? opts : {})
|
||||
|
||||
if (!validUrl.isUri(uri)) {
|
||||
throw new Error('Not a valid URI')
|
||||
throw new Error('Invalid URI')
|
||||
}
|
||||
|
||||
const spMatches = serviceproviders.match(uri, opts)
|
||||
|
|
|
@ -64,11 +64,11 @@ describe('claims.verify', () => {
|
|||
})
|
||||
it('should throw an error for non-valid URIs', () => {
|
||||
return expect(doipjs.claims.verify('noURI')).to.eventually.be.rejectedWith(
|
||||
'Not a valid URI'
|
||||
'Invalid URI'
|
||||
)
|
||||
return expect(
|
||||
doipjs.claims.verify('domain.org')
|
||||
).to.eventually.be.rejectedWith('Not a valid URI')
|
||||
).to.eventually.be.rejectedWith('Invalid URI')
|
||||
})
|
||||
|
||||
doipjs.serviceproviders.list.forEach((spName, i) => {
|
||||
|
|
Loading…
Reference in a new issue