fix: use env only

This commit is contained in:
2026-03-16 15:05:48 +01:00
parent e13e1eb3dd
commit 829ac07d38
3 changed files with 25 additions and 3 deletions

View File

@@ -52,6 +52,15 @@ export default defineEventHandler(async (event) => {
} catch (error) {
console.error("Erreur execution script:", error)
if (
typeof error === "object" &&
error !== null &&
"statusCode" in error &&
"statusMessage" in error
) {
throw error
}
throw createError({
statusCode: 500,
statusMessage: "Erreur lors de l'opération"