Skip to content

Commit 8f8b473

Browse files
fix(linear): silence 401/403 auth errors when not configured
- Don't log expected auth failures in Linear client - Silent fail in task picker for auth errors - Reduces noise when Linear API key not set
1 parent f5447d9 commit 8f8b473

4 files changed

Lines changed: 24 additions & 9 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackmemoryai/stackmemory",
3-
"version": "0.5.41",
3+
"version": "0.5.42",
44
"description": "Lossless memory runtime for AI coding tools - organizes context as a call stack instead of linear chat logs, with team collaboration and infinite retention",
55
"engines": {
66
"node": ">=20.0.0",

src/hooks/linear-task-picker.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,13 @@ export async function pickNextLinearTask(
216216
score: best.score,
217217
};
218218
} catch (error) {
219-
console.error('[linear-task-picker] Error fetching tasks:', error);
219+
// Silent fail for auth errors (401/403) - expected when not configured
220+
const isAuthError =
221+
error instanceof Error &&
222+
(error.message.includes('401') || error.message.includes('403'));
223+
if (!isAuthError) {
224+
console.error('[linear-task-picker] Error fetching tasks:', error);
225+
}
220226
return null;
221227
}
222228
}
@@ -271,7 +277,13 @@ export async function getTopTaskSuggestions(
271277
};
272278
});
273279
} catch (error) {
274-
console.error('[linear-task-picker] Error fetching tasks:', error);
280+
// Silent fail for auth errors (401/403) - expected when not configured
281+
const isAuthError =
282+
error instanceof Error &&
283+
(error.message.includes('401') || error.message.includes('403'));
284+
if (!isAuthError) {
285+
console.error('[linear-task-picker] Error fetching tasks:', error);
286+
}
275287
return [];
276288
}
277289
}

src/integrations/linear/client.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,13 @@ export class LinearClient {
219219

220220
if (!response.ok) {
221221
const errorText = await response.text();
222-
logger.error(
223-
'Linear API error response:',
224-
new Error(`${response.status}: ${errorText}`)
225-
);
222+
// Don't log 401/403 - expected when not authenticated
223+
if (response.status !== 401 && response.status !== 403) {
224+
logger.error(
225+
'Linear API error response:',
226+
new Error(`${response.status}: ${errorText}`)
227+
);
228+
}
226229
throw new IntegrationError(
227230
`Linear API error: ${response.status} ${response.statusText}`,
228231
ErrorCode.LINEAR_API_ERROR,

0 commit comments

Comments
 (0)