silverwolf-x/project / packages /next /src /client /components /hooks-server-context.ts
silverwolf-x's picture
download
raw
539 Bytes
const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'
export class DynamicServerError extends Error {
digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE
constructor(public readonly description: string) {
super(`Dynamic server usage: ${description}`)
}
}
export function isDynamicServerError(err: unknown): err is DynamicServerError {
if (
typeof err !== 'object' ||
err === null ||
!('digest' in err) ||
typeof err.digest !== 'string'
) {
return false
}
return err.digest === DYNAMIC_ERROR_CODE
}

Xet Storage Details

Size:
539 Bytes
·
Xet hash:
530f0d5b81c77cb6d1536f89d248f7788d3c5a5b7afd21d99887b3763186ebe0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.