summaryrefslogtreecommitdiff
path: root/src/main/kotlin/dev/dnpm
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/dev/dnpm')
-rw-r--r--src/main/kotlin/dev/dnpm/etl/processor/web/ApplicationControllerAdvice.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/dev/dnpm/etl/processor/web/ApplicationControllerAdvice.kt b/src/main/kotlin/dev/dnpm/etl/processor/web/ApplicationControllerAdvice.kt
index 0dec30e..e81b348 100644
--- a/src/main/kotlin/dev/dnpm/etl/processor/web/ApplicationControllerAdvice.kt
+++ b/src/main/kotlin/dev/dnpm/etl/processor/web/ApplicationControllerAdvice.kt
@@ -24,10 +24,11 @@ import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.ResponseStatus
+import org.springframework.web.servlet.resource.NoResourceFoundException
@ControllerAdvice
class ApplicationControllerAdvice {
- @ExceptionHandler(NotFoundException::class)
+ @ExceptionHandler(NotFoundException::class, NoResourceFoundException::class)
@ResponseStatus(HttpStatus.NOT_FOUND)
- fun handleNotFoundException(e: NotFoundException): String = "errors/404"
+ fun handleNotFoundException(e: Exception): String = "errors/404"
}