LibreChat/packages/api/src/pulls/diagnostics.ts
Marco Beretta 1bbef4a71e
🔎 fix: Quiet Initial PR Discovery Failures and Add Safe Diagnostics (#17436)
* fix: Quiet Initial PR Discovery Failures and Add Safe Diagnostics

* fix: Resolve PR Discovery Static Check Failures
2026-10-25 23:18:10 +01:00

14 lines
656 B
TypeScript

import { logger } from '@librechat/data-schemas';
import type { PullRequestProvider } from 'librechat-data-provider';
import type { PullRequestErrorCode } from './types';
/** Provider responses cannot prove whether a comparison failed due to access or missing commits. */
type DiscoveryReason = PullRequestErrorCode | 'COMPARISON_UNAVAILABLE' | 'COMPARISON_LIMIT';
/** Only bounded codes leave discovery here, never credentials, repository identity or payloads. */
export function logDiscoveryDiagnostic(
provider: PullRequestProvider,
reason: DiscoveryReason,
): void {
logger.debug('[PullRequests] Discovery diagnostic', { provider, reason });
}