diff --git a/src/main/java/com/flowingcode/vaadin/addons/errorwindow/ErrorView.java b/src/main/java/com/flowingcode/vaadin/addons/errorwindow/ErrorView.java index 2261c4d..41e1738 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/errorwindow/ErrorView.java +++ b/src/main/java/com/flowingcode/vaadin/addons/errorwindow/ErrorView.java @@ -25,7 +25,6 @@ import com.vaadin.flow.router.ErrorParameter; import com.vaadin.flow.router.HasErrorParameter; import com.vaadin.flow.router.internal.DefaultErrorHandler; -import org.apache.http.HttpStatus; /** View used to display an error message when navigation fails due to an exception. */ @SuppressWarnings("serial") @@ -34,6 +33,8 @@ @jakarta.annotation.security.PermitAll public class ErrorView extends VerticalLayout implements HasErrorParameter { + private static final int INTERNAL_SERVER_ERROR = 500; + /** * This method sets the error parameter to display the error message and returns an HTTP status * code of 500 Internal Server Error. @@ -57,7 +58,7 @@ public void close() { } }.getChildren().forEach(this::add); - return HttpStatus.SC_INTERNAL_SERVER_ERROR; + return INTERNAL_SERVER_ERROR; } }