MCPcopy Create free account
hub / github.com/fontsource/fontsource / handleBucketError

Function handleBucketError

api/download/src/bucket.ts:47–56  ·  view source on GitHub ↗
(resp: Response, msg: string)

Source from the content-addressed store, hash-verified

45 `${id}@${version}/variable/${subset}-${axes}-${style}.woff2`;
46
47const handleBucketError = (resp: Response, msg: string) => {
48 if (resp.status === 401) {
49 throw new StatusError(
50 401,
51 'Unauthorized. Please check your UPLOAD_KEY environment variable.',
52 );
53 }
54
55 throw new StatusError(500, `Internal Server Error. ${msg}`);
56};
57
58export const listBucket = async (prefix: string) => {
59 keepAwake(SLEEP_MINUTES);

Callers 7

listBucketFunction · 0.85
abortMultiPartUploadFunction · 0.85
initiateMultipartUploadFunction · 0.85
uploadPartFunction · 0.85
completeMultipartUploadFunction · 0.85
putBucketFunction · 0.85
getBucketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected