ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/app/api/debug/github-rate-limit/route.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/app/api/debug/github-rate-limit/route.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/app/api/debug/github-rate-limit/route.ts
Original SHA-2565d2c959be3e2cd5be7e54f9ad0e9d2cf72733ac74b1c2b4fbd3cf1f3a1429a34
Git blob SHAfd4d90563f9940932f5b6df36eb9a71836675574
Reading-copy SHA-2565d2c959be3e2cd5be7e54f9ad0e9d2cf72733ac74b1c2b4fbd3cf1f3a1429a34

Original source ↗

Recovered source transcript

import { logger } from '@thedaviddias/logging' import { NextResponse } from 'next/server' import { ensureDebugAccess } from '@/app/api/debug/_utils' import { GitHubAPIClient } from '@/lib/github-security-utils' /** * GET handler for GitHub rate limit debugging * * @returns Promise resolving to NextResponse with rate limit info or error */ export async function GET(request: Request) { const access = await ensureDebugAccess(request) if (!access.ok) { return access.response } try { const _githubClient = GitHubAPIClient.getInstance() // Make a simple request to check rate limit const response = await fetch('https://api.github.com/rate_limit', { headers: { Accept: 'application/vnd.github.v3+json', ...(process.env.GITHUB_TOKEN && { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` }) } }) if (!response.ok) { return NextResponse.json( { error: 'Failed to fetch rate limit info', status: response.status, statusText: response.statusText }, { status: 500 } ) } const rateLimitData = await response.json() return NextResponse.json({ rateLimit: rateLimitData, timestamp: new Date().toISOString() }) } catch (error) { logger.error('Debug: Error fetching rate limit info', { data: { error: error instanceof Error ? error.message : 'Unknown error' }, tags: { type: 'debug', component: 'rate-limit', error: 'fetch-failed' } }) return NextResponse.json( { error: 'Failed to fetch rate limit info', details: error instanceof Error ? error.message : 'Unknown error', timestamp: new Date().toISOString() }, { status: 500 } ) } }

Search equations, builds, manuscript text, and recovered sources.