Skip to content

Commit e3b9475

Browse files
committed
lint: remove unused error catch param
1 parent dbf0ee5 commit e3b9475

11 files changed

Lines changed: 15 additions & 15 deletions

File tree

dev-packages/browser-integration-tests/utils/replayHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export function replayEnvelopeIsCompressed(resOrReq: Request | Response): boolea
364364
const lines: boolean[] = envelopeString.split('\n').map(line => {
365365
try {
366366
JSON.parse(line);
367-
} catch (_error) {
367+
} catch {
368368
// If we fail to parse a line, we _might_ have found a compressed payload,
369369
// so let's check if this is actually the case.
370370
// This is quite hacky but we can't go through `line` because the prior operations
@@ -394,7 +394,7 @@ export const replayEnvelopeParser = (request: Request | null): unknown[] => {
394394
const lines = envelopeString.split('\n').map(line => {
395395
try {
396396
return JSON.parse(line);
397-
} catch (_error) {
397+
} catch {
398398
// If we fail to parse a line, we _might_ have found a compressed payload,
399399
// so let's check if this is actually the case.
400400
// This is quite hacky but we can't go through `line` because the prior operations

dev-packages/node-integration-tests/suites/tracing/google-genai/scenario.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async function run() {
102102
},
103103
],
104104
});
105-
} catch (_error) {
105+
} catch {
106106
// Expected error
107107
}
108108
});

dev-packages/node-overhead-gh-action/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async function run() {
157157
body,
158158
});
159159
}
160-
} catch (_error) {
160+
} catch {
161161
core.error(
162162
"Error updating comment. This can happen for PR's originating from a fork without write permissions.",
163163
);

dev-packages/size-limit-gh-action/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async function run() {
171171
body,
172172
});
173173
}
174-
} catch (_error) {
174+
} catch {
175175
core.error(
176176
"Error updating comment. This can happen for PR's originating from a fork without write permissions.",
177177
);

packages/cloudflare/test/workflow.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const mockStep: WorkflowStep = {
2626
} else {
2727
return await (maybeCallback ? maybeCallback() : Promise.resolve());
2828
}
29-
} catch (_error) {
29+
} catch {
3030
await new Promise(resolve => setTimeout(resolve, 1000));
3131
}
3232
}

packages/core/src/utils/exports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function replaceExports(
2121
// Replace the named export - handle read-only properties
2222
try {
2323
exports[exportName] = wrappedConstructor;
24-
} catch (_error) {
24+
} catch {
2525
// If direct assignment fails, override the property descriptor
2626
Object.defineProperty(exports, exportName, {
2727
value: wrappedConstructor,
@@ -35,7 +35,7 @@ export function replaceExports(
3535
if (exports.default === original) {
3636
try {
3737
exports.default = wrappedConstructor;
38-
} catch (_error) {
38+
} catch {
3939
Object.defineProperty(exports, 'default', {
4040
value: wrappedConstructor,
4141
writable: true,

packages/google-cloud-serverless/test/gcpfunction/http.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('GCPFunction', () => {
6363

6464
try {
6565
fn(req, res);
66-
} catch (_error) {
66+
} catch {
6767
res.end();
6868
}
6969
});

packages/node/src/integrations/tracing/anthropic-ai/instrumentation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class SentryAnthropicAiInstrumentation extends InstrumentationBase<Anthro
8989
// The Anthropic property might have only a getter, so use defineProperty
9090
try {
9191
exports.Anthropic = WrappedAnthropic;
92-
} catch (_error) {
92+
} catch {
9393
// If direct assignment fails, override the property descriptor
9494
Object.defineProperty(exports, 'Anthropic', {
9595
value: WrappedAnthropic,
@@ -105,7 +105,7 @@ export class SentryAnthropicAiInstrumentation extends InstrumentationBase<Anthro
105105
if (exports.default === Original) {
106106
try {
107107
exports.default = WrappedAnthropic;
108-
} catch (_error) {
108+
} catch {
109109
// If direct assignment fails, override the property descriptor
110110
Object.defineProperty(exports, 'default', {
111111
value: WrappedAnthropic,

packages/node/src/integrations/tracing/openai/instrumentation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class SentryOpenAiInstrumentation extends InstrumentationBase<OpenAiInstr
103103
// The OpenAI property might have only a getter, so use defineProperty
104104
try {
105105
exports[exportKey] = WrappedOpenAI;
106-
} catch (_error) {
106+
} catch {
107107
// If direct assignment fails, override the property descriptor
108108
Object.defineProperty(exports, exportKey, {
109109
value: WrappedOpenAI,
@@ -119,7 +119,7 @@ export class SentryOpenAiInstrumentation extends InstrumentationBase<OpenAiInstr
119119
if (exports.default === Original) {
120120
try {
121121
exports.default = WrappedOpenAI;
122-
} catch (_error) {
122+
} catch {
123123
// If direct assignment fails, override the property descriptor
124124
Object.defineProperty(exports, 'default', {
125125
value: WrappedOpenAI,

packages/nuxt/src/runtime/plugins/storage.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function isCacheHit(key: string, value: unknown): boolean {
262262
}
263263

264264
return validateCacheEntry(key, JSON.parse(String(value)) as CacheEntry);
265-
} catch (_error) {
265+
} catch {
266266
// this is a best effort, so we return false if we can't validate the cache entry
267267
return false;
268268
}

0 commit comments

Comments
 (0)