MCPcopy
hub / github.com/CapSoftware/Cap / getResource

Function getResource

scripts/analytics/shared.js:179–186  ·  view source on GitHub ↗
(resourcePath, { allowNotFound = false } = {})

Source from the content-addressed store, hash-verified

177 };
178
179 const getResource = async (resourcePath, { allowNotFound = false } = {}) => {
180 try {
181 return await request(resourcePath);
182 } catch (error) {
183 if (allowNotFound && error.status === 404) return null;
184 throw error;
185 }
186 };
187
188 return {
189 host: formatHost(auth.host),

Callers 1

createTinybirdClientFunction · 0.85

Calls 1

requestFunction · 0.70

Tested by

no test coverage detected