MCPcopy Create free account
hub / github.com/FxEmbed/FxEmbed / returnError

Function returnError

src/embed/status.ts:68–84  ·  view source on GitHub ↗
(c: Context, error: string)

Source from the content-addressed store, hash-verified

66};
67
68export const returnError = (c: Context, error: string): Response => {
69 const branding = getBranding(c);
70 console.log('branding', JSON.stringify(branding));
71 return c.html(
72 Strings.BASE_HTML.format({
73 runtime: formatRuntime(),
74 brandingName: branding.name,
75 body: '',
76 lang: '',
77 headers: [
78 `<meta property="og:title" content="${branding.name}"/>`,
79 `<meta property="og:description" content="${error}"/>`,
80 `<meta property="theme-color" content="${branding.color}"/>`
81 ].join('')
82 })
83 ) as Response;
84};
85/* Handler for Twitter statuses (Tweets).
86 Like Twitter, we use the terminologies interchangably. */
87export const handleStatus = async (

Callers 3

statusRequestFunction · 0.90
handleActivityFunction · 0.90
handleStatusFunction · 0.70

Calls 3

getBrandingFunction · 0.90
formatRuntimeFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected