diff --git a/package-lock.json b/package-lock.json index 7ae8cae..4ce72dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "auth0-source-control-extension-tools", - "version": "4.1.10", + "version": "4.1.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 45f98a2..2ae14a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auth0-source-control-extension-tools", - "version": "4.1.10", + "version": "4.1.11", "description": "Supporting tools for the Source Control extensions", "main": "lib/index.js", "scripts": { diff --git a/src/auth0/handlers/hooks.js b/src/auth0/handlers/hooks.js index 54cef8f..35743a6 100644 --- a/src/auth0/handlers/hooks.js +++ b/src/auth0/handlers/hooks.js @@ -154,7 +154,7 @@ export default class HooksHandler extends DefaultHandler { return this.existing; } catch (err) { - if (err.statusCode === 404 || err.statusCode === 403 || err.statusCode === 501) { + if (err.statusCode === 404 || err.statusCode === 501) { return []; } throw err; diff --git a/tests/auth0/handlers/hooks.tests.js b/tests/auth0/handlers/hooks.tests.js index f25b664..3647940 100644 --- a/tests/auth0/handlers/hooks.tests.js +++ b/tests/auth0/handlers/hooks.tests.js @@ -254,23 +254,6 @@ describe('#hooks handler', () => { expect(data).to.deep.equal([]); }); - it('should return an empty array for 403 status code', async () => { - const auth0 = { - hooks: { - getAll: () => { - const error = new Error('This endpoint is disabled for your tenant.'); - error.statusCode = 403; - throw error; - } - }, - pool - }; - - const handler = new hooks.default({ client: auth0, config }); - const data = await handler.getType(); - expect(data).to.deep.equal([]); - }); - it('should throw an error for all other failed requests', async () => { const auth0 = { hooks: {