Add error logs for server functions. Add cache dynamic function.

This commit is contained in:
2026-03-27 05:22:31 +01:00
parent 572f739b5c
commit 950bdc3dca
10 changed files with 157 additions and 32 deletions
@@ -1,4 +1,5 @@
import _ from "lodash";
import { log } from "../../../utils/log";
export default async function grabPageServerRes({ url, query, routeParams, server_function, }) {
const default_props = {
url: url
@@ -37,8 +38,10 @@ export default async function grabPageServerRes({ url, query, routeParams, serve
};
}
catch (error) {
log.error(`Page ${url?.pathname} Server Error => ${error.message}\n`, error);
return {
...default_props,
error: error.message,
};
}
}