feat(platform): checkpoint current implementation state
This commit is contained in:
@@ -45,8 +45,19 @@ const handler = async (req: NextRequest) => {
|
||||
};
|
||||
|
||||
if (process.env["NODE_ENV"] === "development") {
|
||||
options.onError = ({ path, error }: { path?: string; error: { message: string } }) => {
|
||||
console.error(`❌ tRPC failed on ${path ?? "<no-path>"}: ${error.message}`);
|
||||
options.onError = ({
|
||||
path,
|
||||
error,
|
||||
}: {
|
||||
path?: string;
|
||||
error: { message: string; code?: string };
|
||||
}) => {
|
||||
const label = `tRPC ${path ?? "<no-path>"}`;
|
||||
if (error.code === "NOT_FOUND") {
|
||||
console.warn(`⚠️ ${label}: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
console.error(`❌ ${label}: ${error.message}`);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user