diff --git a/src/pages/api/revalidate.ts b/src/pages/api/revalidate.ts index 4fda1c6c8ac..1d1451dfd6a 100644 --- a/src/pages/api/revalidate.ts +++ b/src/pages/api/revalidate.ts @@ -41,8 +41,9 @@ export default async function handler( console.log(`Revalidating ${localePath}`) try { await res.revalidate(localePath) - } catch (error) { - console.error(`Error revalidating ${localePath}:`, error) + } catch (err) { + console.error(`Error revalidating ${localePath}`, err) + throw new Error(`Error revalidating ${localePath}`) } }) )