Refactor error handling in various components to ignore modal display failures and improve code clarity
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 51s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 51s
This commit is contained in:
@@ -119,7 +119,9 @@ export default defineEventHandler(async (event) => {
|
||||
// Titel ist Pflichtfeld
|
||||
if (!body.title || !body.title.trim()) {
|
||||
// Lösche die hochgeladene Datei
|
||||
await fs.unlink(file.path).catch(() => {})
|
||||
await fs.unlink(file.path).catch(() => {
|
||||
// Datei bereits gelöscht oder nicht vorhanden, ignorieren
|
||||
})
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: 'Titel ist ein Pflichtfeld'
|
||||
|
||||
Reference in New Issue
Block a user