(c: Context, error: string)
| 66 | }; |
| 67 | |
| 68 | export 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. */ |
| 87 | export const handleStatus = async ( |
no test coverage detected