(c: Context, error: string)
| 9 | import { formatRuntime } from './helpers/runtime'; |
| 10 | |
| 11 | export 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 */ |
| 28 | export const handleProfile = async ( |
no test coverage detected