MCPcopy
hub / github.com/anomalyco/opencode / error

Function error

packages/core/src/oauth/page.ts:35–49  ·  view source on GitHub ↗
(detail: string, options?: CallbackPageOptions)

Source from the content-addressed store, hash-verified

33}
34
35export function error(detail: string, options?: CallbackPageOptions) {
36 const provider = options?.provider
37 return renderDocument({
38 title: "Authorization failed",
39 body: renderCard({
40 status: "error",
41 headline: "Authorization failed",
42 message: provider
43 ? `OpenCode couldn't finish connecting to ${escapeHtml(provider)}.`
44 : "OpenCode couldn't complete authorization.",
45 detail,
46 footnote: "Close this window and try again from OpenCode.",
47 }),
48 })
49}
50
51export interface BootstrapOptions {
52 /** Same-origin path the in-browser script POSTs the parsed callback to. */

Callers 7

EnterpriseFunction · 0.50
IntentFormFunction · 0.50
CodeMethodFunction · 0.50
InlineToolFunction · 0.50
BlockToolFunction · 0.50
SessionTurnFunction · 0.50
message-part.tsxFile · 0.50

Calls 3

renderDocumentFunction · 0.85
renderCardFunction · 0.85
escapeHtmlFunction · 0.70

Tested by

no test coverage detected