feat: add preview image builder

This commit is contained in:
BennyKok
2024-01-04 22:29:22 +08:00
parent 314eb9fd16
commit 9937252777
18 changed files with 1085 additions and 56 deletions
+3
View File
@@ -1,5 +1,8 @@
import { isRedirectError } from "next/dist/client/components/redirect";
export async function wrapServerPromise<T>(result: Promise<T>) {
return result.catch((error) => {
if (isRedirectError(error)) throw error;
return {
error: error.message,
};