Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add try-catch block to authentication manager #336

Merged
merged 5 commits into from
Aug 19, 2024

Conversation

swetabar
Copy link
Contributor

Related Issues

Add try-catch block to authentication-manager to try and figure out the issue with ScopedApiKeyHandler

@swetabar swetabar requested a review from blefebvre August 19, 2024 14:50
Copy link
Contributor

@blefebvre blefebvre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor item with the log statement.

Is an additional test case needed to hit the catch block?

@@ -46,6 +46,7 @@ export default class ScopedApiKeyHandler extends AbstractHandler {
this.log(`No API key entity found in the data layer for the provided API key: ${apiKeyFromHeader}`, 'error');
return null;
}
this.log(`API Key entity: ${apiKeyEntity}`, 'debug');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this object be stringified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing these logs as we might not need them anymore.

Copy link

This PR will trigger a patch release when merged.

@swetabar
Copy link
Contributor Author

Minor item with the log statement.

Is an additional test case needed to hit the catch block?

Yes. Added the additional test case to fix the test errors.

@swetabar swetabar merged commit a6cf629 into main Aug 19, 2024
9 checks passed
@swetabar swetabar deleted the add-try-catch-to-auth-manager branch August 19, 2024 16:40
adobe-bot pushed a commit that referenced this pull request Aug 19, 2024
# [@adobe/spacecat-shared-http-utils-v1.6.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-http-utils-v1.6.6...@adobe/spacecat-shared-http-utils-v1.6.7) (2024-08-19)

### Bug Fixes

* add try-catch block to authentication manager ([#336](#336)) ([a6cf629](a6cf629))
@adobe-bot
Copy link

🎉 This issue has been resolved in version @adobe/spacecat-shared-http-utils-v1.6.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants