MCPcopy Create free account
hub / github.com/pollinations/pollinations / stringifyRequestInputs

Function stringifyRequestInputs

shared/observability/request-inputs.ts:49–58  ·  view source on GitHub ↗
(inputs: RequestInputs | undefined)

Source from the content-addressed store, hash-verified

47}
48
49export function stringifyRequestInputs(inputs: RequestInputs | undefined) {
50 try {
51 return JSON.stringify(inputs ?? {});
52 } catch (error) {
53 return JSON.stringify({
54 error: "request_inputs_json_stringify_failed",
55 message: error instanceof Error ? error.message : String(error),
56 });
57 }
58}
59
60async function requestBody(c: Context): Promise<unknown> {
61 if (!BODY_METHODS.has(c.req.method)) return undefined;

Callers 1

toTinybirdErrorEventFunction · 0.90

Calls 1

stringifyMethod · 0.80

Tested by

no test coverage detected