Skip to content

Commit 44c7415

Browse files
authored
Merge pull request #46 from seamapi/captureStackTrace
fix: Error in some contexts when using Error.captureStackTrace()
2 parents f7fd922 + cf036ae commit 44c7415

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

src/lib/seam/connect/auth.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ export class SeamHttpInvalidTokenError extends Error {
248248
constructor(message: string) {
249249
super(`SeamHttp received an invalid token: ${message}`)
250250
this.name = this.constructor.name
251-
Error.captureStackTrace(this, this.constructor)
252251
}
253252
}
254253

src/lib/seam/connect/options.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ export class SeamHttpInvalidOptionsError extends Error {
235235
constructor(message: string) {
236236
super(`SeamHttp received invalid options: ${message}`)
237237
this.name = this.constructor.name
238-
Error.captureStackTrace(this, this.constructor)
239238
}
240239
}
241240

src/lib/seam/connect/resolve-action-attempt.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export class SeamActionAttemptError<T extends ActionAttempt> extends Error {
7373
super(message)
7474
this.name = this.constructor.name
7575
this.actionAttempt = actionAttempt
76-
Error.captureStackTrace(this, this.constructor)
7776
}
7877
}
7978

@@ -92,7 +91,6 @@ export class SeamActionAttemptFailedError<
9291
super(actionAttempt.error.message, actionAttempt)
9392
this.name = this.constructor.name
9493
this.code = actionAttempt.error.type
95-
Error.captureStackTrace(this, this.constructor)
9694
}
9795
}
9896

@@ -111,7 +109,6 @@ export class SeamActionAttemptTimeoutError<
111109
actionAttempt,
112110
)
113111
this.name = this.constructor.name
114-
Error.captureStackTrace(this, this.constructor)
115112
}
116113
}
117114

src/lib/seam/connect/seam-http-error.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export class SeamHttpApiError extends Error {
1010
const { type, message, data } = error
1111
super(message)
1212
this.name = this.constructor.name
13-
Error.captureStackTrace(this, this.constructor)
1413
this.code = type
1514
this.statusCode = statusCode
1615
this.requestId = requestId
@@ -33,7 +32,6 @@ export class SeamHttpUnauthorizedError extends SeamHttpApiError {
3332
const status = 401
3433
super({ type, message: 'Unauthorized' }, status, requestId)
3534
this.name = this.constructor.name
36-
Error.captureStackTrace(this, this.constructor)
3735
this.code = type
3836
this.statusCode = status
3937
this.requestId = requestId
@@ -52,7 +50,6 @@ export class SeamHttpInvalidInputError extends SeamHttpApiError {
5250
constructor(error: ApiError, statusCode: number, requestId: string) {
5351
super(error, statusCode, requestId)
5452
this.name = this.constructor.name
55-
Error.captureStackTrace(this, this.constructor)
5653
this.code = 'invalid_input'
5754
}
5855
}

0 commit comments

Comments
 (0)