diff --git a/src/claims.js b/src/claims.js index 3d1b813..ad31a26 100644 --- a/src/claims.js +++ b/src/claims.js @@ -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) diff --git a/test/claims.test.js b/test/claims.test.js index c5b6b19..0f7f2b6 100644 --- a/test/claims.test.js +++ b/test/claims.test.js @@ -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) => {