-
Notifications
You must be signed in to change notification settings - Fork 51
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
Log HTTP 409 error responses with breadcrumbs #613
Conversation
src/core/account/account-init.ts
Outdated
@@ -37,6 +37,9 @@ async function createChildLogin( | |||
login: LoginTree, | |||
appId: string | |||
): Promise<LoginTree> { | |||
// For crash errors: | |||
ai.props.log.breadcrumb('createChildLogin', {}) |
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.
Move this to ensureAccountExists
as part of the logic.
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.
There already is a log to ensureAccountExists
. But it doesn't necessarily catch whether createChildLogin
was invoked.
// For crash errors: | ||
ai.props.log.breadcrumb('makeKeysKit', {}) |
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.
This seems redundant with all the other logging, but I guess we could keep it to have a trace like:
- createCurrencyWallet
- makeKeysKit (no kidding?)
- crash: Login API conflict error
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'm erring on the side of redundancy since this could be a race-condition issue somewhere, so having more information even if it's obvious could reveal to us the race condition.
The breadcrumbs were left in places leading up to `/v2/login/create` and `/v2/login/keys` endpoints to the login server.
68850dc
to
8a70300
Compare
The breadcrumbs were left in places leading up to
/v2/login/create
and/v2/login/keys
endpoints to the login server.CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
none