Skip to content

Commit 3682cd7

Browse files
committed
fix(plugin-auth): the SSO group projection logs a failure on the host logger's error channel
Claude-Session: https://claude.ai/code/session_01ADHkmNwrm1hJ9e7eLARM7n Co-authored-by: Claude <noreply@anthropic.com>
1 parent de80434 commit 3682cd7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎packages/plugins/plugin-auth/src/auth-manager-plugin-list.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,14 @@ export async function buildPluginList(this: PluginListHost): Promise<any[]> {
788788
getEngine: () => this.getDataEngine(),
789789
boundary: async () => (await this.config.organizationBoundary?.().catch(() => undefined)) ?? undefined,
790790
warn: (message) => this.config.logger?.warn?.(message),
791-
error: (message) => this.config.logger?.error?.(message),
791+
// The host logger carries `error` though the config type names only
792+
// `info`/`warn` (as `logAfterResponseSendFailure` reads it); with none,
793+
// the console's error stream, never a lower level.
794+
error: (message) => {
795+
const sink = this.config.logger as { error?: (msg: string) => void } | undefined;
796+
if (typeof sink?.error === 'function') sink.error(message);
797+
else console.error(message);
798+
},
792799
}),
793800
provisionUserOnEveryLogin: true,
794801
});

0 commit comments

Comments
 (0)