diff --git a/modules/web/src/main/java/org/jboss/weld/module/web/context/beanstore/http/LazySessionBeanStore.java b/modules/web/src/main/java/org/jboss/weld/module/web/context/beanstore/http/LazySessionBeanStore.java index 13ac3e3950..438b41d7d4 100644 --- a/modules/web/src/main/java/org/jboss/weld/module/web/context/beanstore/http/LazySessionBeanStore.java +++ b/modules/web/src/main/java/org/jboss/weld/module/web/context/beanstore/http/LazySessionBeanStore.java @@ -85,10 +85,10 @@ protected HttpSession getSession(boolean create) { try { return SessionHolder.getSession(request, create); } catch (IllegalStateException e) { - // If container can't create an underlying session, invalidate the - // current one + // If container can't create an underlying session, invalidate the current one detach(); - return null; + // re-throw the exception to properly show cause and message + throw e; } }