Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #117 from luisbritos/report_hook_error_403
Browse files Browse the repository at this point in the history
[ESD-9513] a0deploy hooks export failed but no error reported
  • Loading branch information
luisbritos authored Nov 13, 2020
2 parents db367fd + 3db8a7b commit 33a855c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/auth0/handlers/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 0 additions & 17 deletions tests/auth0/handlers/hooks.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 33a855c

Please sign in to comment.