diff --git a/bskyogcard/src/routes/post.tsx b/bskyogcard/src/routes/post.tsx index c0c2fe4223..ce488f4fd4 100644 --- a/bskyogcard/src/routes/post.tsx +++ b/bskyogcard/src/routes/post.tsx @@ -89,7 +89,10 @@ export default function (ctx: AppContext, app: Express) { return res.end(output.asPng()) } catch (err) { - httpLogger.warn({err, uri: uri.toString()}, 'could not fetch post') + httpLogger.warn( + {err, uri: uri.toString()}, + `Failed to render post ${uri}`, + ) return res.status(404).end('not found') } }), diff --git a/bskyogcard/src/util/postDisplayOptions.ts b/bskyogcard/src/util/postDisplayOptions.ts index 6ae38007df..32d3698560 100644 --- a/bskyogcard/src/util/postDisplayOptions.ts +++ b/bskyogcard/src/util/postDisplayOptions.ts @@ -4,6 +4,9 @@ import {getWidthWithMat} from './frameMatting.js' export const DEFAULT_WIDTH = 360 +/** + * Options parsed from the query string, passed to the components themselves. + */ export type DisplayOptions = { mat: boolean } @@ -25,6 +28,10 @@ export function parseDisplayOptionsFromQuery(query: ParsedQs): DisplayOptions { return opts } +/** + * Options computed from the parsed query options, passed to the render + * function. + */ export function getRenderOptions(options: DisplayOptions) { return { // must match width + padding of Post.tsx