Await contact handler to surface errors

This commit is contained in:
Calum Muir 2025-12-28 13:14:51 +00:00
parent 4c0bdbdbac
commit 5f01d89a62

View file

@ -156,7 +156,7 @@ export const onRequest: PagesFunction<Env> = async (context) => {
405,
);
}
return handlePost(context);
return await handlePost(context);
} catch (error) {
const message =
error instanceof Error ? error.message : "Unknown error";