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

Function returnError

src/user.ts:11–25  ·  view source on GitHub ↗
(c: Context, error: string)

Source from the content-addressed store, hash-verified

9import { formatRuntime } from './helpers/runtime';
10
11export const returnError = (c: Context, error: string): Response => {
12 const branding = getBranding(c);
13 return c.html(
14 Strings.BASE_HTML.format({
15 runtime: formatRuntime(),
16 lang: '',
17 body: '',
18 headers: [
19 `<meta property="og:title" content="${branding.name}"/>`,
20 `<meta property="og:description" content="${error}"/>`,
21 `<meta property="theme-color" content="${branding.color}"/>`
22 ].join('')
23 })
24 ) as Response;
25};
26
27/* Handler for Twitter users */
28export const handleProfile = async (

Callers 1

handleProfileFunction · 0.70

Calls 3

getBrandingFunction · 0.90
formatRuntimeFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected