-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Refactor credentials endpoints for user management #2688
Refactor credentials endpoints for user management #2688
Conversation
packages/cli/src/Server.ts
Outdated
if (!savedCredential) { | ||
throw new ResponseHelper.ResponseError('Failed to save credential', undefined, 500); | ||
} |
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.
I think if the transaction fails we anyway never reach this code 🤔
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.
Found a third way - returning a value inside the transaction makes it available in the outer scope. Otherwise TS would be unable to tell that savedCredential
is not undefined
after the transaction.
Pinned chokidar to fix build: #2696