Skip to content

Commit 6a64055

Browse files
committed
fix(core): auth fail reason should be error.name (#8822)
fix AF-1701
1 parent c712e87 commit 6a64055

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/frontend/core/src/modules/cloud/services

packages/frontend/core/src/modules/cloud/services/auth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class AuthService extends Service {
114114
} catch (e) {
115115
track.$.$.auth.signInFail({
116116
method: 'magic-link',
117-
reason: e instanceof BackendError ? e.originError.type : 'unknown',
117+
reason: e instanceof BackendError ? e.originError.name : 'unknown',
118118
});
119119
throw e;
120120
}
@@ -135,7 +135,7 @@ export class AuthService extends Service {
135135
} catch (e) {
136136
track.$.$.auth.signInFail({
137137
method: 'magic-link',
138-
reason: e instanceof BackendError ? e.originError.type : 'unknown',
138+
reason: e instanceof BackendError ? e.originError.name : 'unknown',
139139
});
140140
throw e;
141141
}
@@ -176,7 +176,7 @@ export class AuthService extends Service {
176176
track.$.$.auth.signInFail({
177177
method: 'oauth',
178178
provider,
179-
reason: e instanceof BackendError ? e.originError.type : 'unknown',
179+
reason: e instanceof BackendError ? e.originError.name : 'unknown',
180180
});
181181
throw e;
182182
}
@@ -200,7 +200,7 @@ export class AuthService extends Service {
200200
track.$.$.auth.signInFail({
201201
method: 'oauth',
202202
provider,
203-
reason: e instanceof BackendError ? e.originError.type : 'unknown',
203+
reason: e instanceof BackendError ? e.originError.name : 'unknown',
204204
});
205205
throw e;
206206
}
@@ -229,7 +229,7 @@ export class AuthService extends Service {
229229
} catch (e) {
230230
track.$.$.auth.signInFail({
231231
method: 'password',
232-
reason: e instanceof BackendError ? e.originError.type : 'unknown',
232+
reason: e instanceof BackendError ? e.originError.name : 'unknown',
233233
});
234234
throw e;
235235
}

0 commit comments

Comments
 (0)