diff --git a/exception-handler-spring-web/src/main/kotlin/ru/touchin/exception/handler/spring/resolvers/NotFoundExceptionResolver.kt b/exception-handler-spring-web/src/main/kotlin/ru/touchin/exception/handler/spring/resolvers/NotFoundExceptionResolver.kt index 13b81d4..5b741a8 100644 --- a/exception-handler-spring-web/src/main/kotlin/ru/touchin/exception/handler/spring/resolvers/NotFoundExceptionResolver.kt +++ b/exception-handler-spring-web/src/main/kotlin/ru/touchin/exception/handler/spring/resolvers/NotFoundExceptionResolver.kt @@ -11,8 +11,8 @@ import ru.touchin.exception.handler.dto.ExceptionResolverResult class NotFoundExceptionResolver : ExceptionResolver { override fun invoke(exception: Exception): ExceptionResolverResult? { - if (exception !is CommonNotFoundException) { - ExceptionResolverResult.createNotFoundError(exception) + if (exception is CommonNotFoundException) { + return ExceptionResolverResult.createNotFoundError(exception) } return null