-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(core): Handle credential decryption failures gracefully on the API #13166
fix(core): Handle credential decryption failures gracefully on the API #13166
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Testing this next
this.errorReporter.error(error, { | ||
level: 'error', | ||
extra: { credentialId: credential.id }, | ||
tags: { credentialType: credential.type }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this to be a tag or extra?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kept the type
in the tags to be able to have an overview, to see if there is any pattern there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely 👏 🚀
✅ All Cypress E2E specs passed |
n8n
|
Project |
n8n
|
Branch Review |
handle-credential-decryption-failures-gracefully
|
Run status |
|
Run duration | 04m 52s |
Commit |
|
Committer | कारतोफ्फेलस्क्रिप्ट™ |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
1
|
|
5
|
|
0
|
|
435
|
View all changes introduced in this branch ↗︎ |
Got released with |
Summary
If the credentials table contains any values that are either invalid JSON when decrypted, or values that fail to decrypt, the API endpoints for fetching credentials on the frontend should not crash, and instead return a
{}
as decrypted data, which in turn marks these credentials with theNeeds first setup
tag on the frontend, so that users can then edit and fix these credentials.Related Linear tickets, Github issues, and Community forum posts
Fixes #12949
Fixes #12940
CAT-632
CAT-616
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)