MCPcopy Create free account
hub / github.com/cloudflare/serverless-registry / wrap

Function wrap

src/utils.ts:60–62  ·  view source on GitHub ↗
(fn: Promise<T>)

Source from the content-addressed store, hash-verified

58 return "unknown error: " + JSON.stringify(err);
59}
60
61export async function wrap<T, E = unknown>(fn: Promise<T>): Promise<[T, null] | [null, E]> {
62 return fn.then((data) => [data, null] as [T, null]).catch((err) => [null, err as unknown as E] as [null, E]);
63}
64
65export function jsonHeaders(): { "content-type": "application/json" } {

Callers 7

router.tsFile · 0.90
manifestExistsMethod · 0.90
putManifestInnerMethod · 0.90
getManifestMethod · 0.90
mountExistingLayerMethod · 0.90
layerExistsMethod · 0.90
getLayerMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected