ADD error handling
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user