Skip to content

Commit

Permalink
fix(core): auth fail reason should be error.name (#8822)
Browse files Browse the repository at this point in the history
  • Loading branch information
forehalo committed Nov 14, 2024
1 parent c712e87 commit 6a64055
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/frontend/core/src/modules/cloud/services/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class AuthService extends Service {
} catch (e) {
track.$.$.auth.signInFail({
method: 'magic-link',
reason: e instanceof BackendError ? e.originError.type : 'unknown',
reason: e instanceof BackendError ? e.originError.name : 'unknown',
});
throw e;
}
Expand All @@ -135,7 +135,7 @@ export class AuthService extends Service {
} catch (e) {
track.$.$.auth.signInFail({
method: 'magic-link',
reason: e instanceof BackendError ? e.originError.type : 'unknown',
reason: e instanceof BackendError ? e.originError.name : 'unknown',
});
throw e;
}
Expand Down Expand Up @@ -176,7 +176,7 @@ export class AuthService extends Service {
track.$.$.auth.signInFail({
method: 'oauth',
provider,
reason: e instanceof BackendError ? e.originError.type : 'unknown',
reason: e instanceof BackendError ? e.originError.name : 'unknown',
});
throw e;
}
Expand All @@ -200,7 +200,7 @@ export class AuthService extends Service {
track.$.$.auth.signInFail({
method: 'oauth',
provider,
reason: e instanceof BackendError ? e.originError.type : 'unknown',
reason: e instanceof BackendError ? e.originError.name : 'unknown',
});
throw e;
}
Expand Down Expand Up @@ -229,7 +229,7 @@ export class AuthService extends Service {
} catch (e) {
track.$.$.auth.signInFail({
method: 'password',
reason: e instanceof BackendError ? e.originError.type : 'unknown',
reason: e instanceof BackendError ? e.originError.name : 'unknown',
});
throw e;
}
Expand Down

0 comments on commit 6a64055

Please sign in to comment.