ADD error handling

This commit is contained in:
2025-05-12 21:57:31 +02:00
parent 489372ea61
commit 25dd60dd82
3 changed files with 14 additions and 5 deletions

View File

@@ -2,7 +2,6 @@ package com.ddf.vodsystem.controllers;
import com.ddf.vodsystem.entities.ClipConfig;
import com.ddf.vodsystem.services.EditService;
import org.atmosphere.config.service.Get;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -34,4 +33,9 @@ public class EditController {
return new ResponseEntity<>(editService.getProgress(uuid), HttpStatus.OK);
}
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity<String> handleIllegalArgument(IllegalArgumentException ex) {
return ResponseEntity.status(404).body(ex.getMessage());
}
}