NeahFront2/node_modules/next/dist/esm/client/components/hooks-server-context.js
2025-04-08 20:36:59 +02:00

16 lines
550 B
JavaScript

const DYNAMIC_ERROR_CODE = "DYNAMIC_SERVER_USAGE";
export class DynamicServerError extends Error {
constructor(description){
super("Dynamic server usage: " + description);
this.description = description;
this.digest = DYNAMIC_ERROR_CODE;
}
}
export function isDynamicServerError(err) {
if (typeof err !== "object" || err === null || !("digest" in err) || typeof err.digest !== "string") {
return false;
}
return err.digest === DYNAMIC_ERROR_CODE;
}
//# sourceMappingURL=hooks-server-context.js.map