MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / errorPage

Function errorPage

packages/cli/src/auth/loopback.ts:199–205  ·  view source on GitHub ↗
(code: string, description: string)

Source from the content-addressed store, hash-verified

197}
198
199function errorPage(code: string, description: string): string {
200 const safeCode = escapeHtml(code);
201 const safeDesc = escapeHtml(description);
202 return `<!doctype html><html><head><meta charset="utf-8"><title>Sign-in failed</title>
203<style>body{font-family:system-ui,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#1a0b0b;color:#e6e8eb}main{max-width:480px;text-align:center;padding:32px;border-radius:12px;background:#1d1111;border:1px solid #301f1f}h1{font-weight:600;margin:0 0 8px;color:#ff7a7a}code{background:#2a1414;padding:2px 6px;border-radius:4px}p{margin:8px 0 0;color:#9aa3ad}</style>
204</head><body><main><h1>Sign-in failed</h1><p><code>${safeCode}</code></p><p>${safeDesc}</p></main></body></html>`;
205}
206
207function escapeHtml(s: string): string {
208 return s

Callers 1

handleRequestFunction · 0.85

Calls 1

escapeHtmlFunction · 0.70

Tested by

no test coverage detected