Source:
<code>static WebApplicationException wrap(final WebApplicationException e) { final ResteasyConfig config = ResteasyConfigFactory.getConfig(); final boolean originalBehavior = Boolean.parseBoolean(config.getValue(ResteasyContextParameters.RESTEASY_ORIGINAL_WEBAPPLICATIONEXCEPTION_BEHAVIOR, <START> ResteasyConfig.SOURCE.SERVLET_CONTEXT, "false")); <END> final boolean serverSide = ResteasyProviderFactory.searchContextData(Dispatcher.class) != null; if (originalBehavior || !serverSide) { return e; } if (e instanceof WebApplicationExceptionWrapper) { return e; } if (e instanceof BadRequestException) { return new ResteasyBadRequestException((BadRequestException) e); } if (e instanceof NotAuthorizedException) { return new ResteasyNotAuthorizedException((NotAuthorizedException) e); } if (e instanceof ForbiddenException) { return new ResteasyForbiddenException((ForbiddenException) e); } if (e instanceof NotFoundException) { return new ResteasyNotFoundException((NotFoundException) e); } if (e instanceof NotAllowedException) { return new ResteasyNotAllowedException((NotAllowedException) e); } if (e instanceof NotAcceptableException) { return new ResteasyNotAcceptableException((NotAcceptableException) e); } if (e instanceof NotSupportedException) { return new ResteasyNotSupportedException((NotSupportedException) e); } if (e instanceof InternalServerErrorException) { return new ResteasyInternalServerErrorException((InternalServerErrorException) e); } if (e instanceof ServiceUnavailableException) { return new ResteasyServiceUnavailableException((ServiceUnavailableException) e); } if (e instanceof ClientErrorException) { return new ResteasyClientErrorException((ClientErrorException) e); } if (e instanceof ServerErrorException) { return new ResteasyServerErrorException((ServerErrorException) e); } if (e instanceof RedirectionException) { return new ResteasyRedirectionException((RedirectionException) e); } return new ResteasyWebApplicationException(e); }</code><technical_language>3.11 is started MicroProfile Config. ResteasyConfiguration config = ResteasyProviderFactory.getContextData(ResteasyConfiguration.class); boolean originalBehavior = false; if (config != null) { try { String s = config.getParameter(ResteasyContextParameters.RESTEASY_ORIGINAL_WEBAPPLICATIONEXCEPTION_BEHAVIOR); originalBehavior = (s == null ? true : Boolean.parseBoolean(s)); } catch (Exception ex) { // } }</technical_language>

Target:
static WebApplicationException wrap(final WebApplicationException e) { ResteasyConfiguration config = ResteasyProviderFactory.getContextData(ResteasyConfiguration.class); boolean originalBehavior = false; try { final String s = config.getParameter(ResteasyContextParameters.RESTEASY_ORIGINAL_WEBAPPLICATIONEXCEPTION_BEHAVIOR); originalBehavior = (s != null && (s.isEmpty() || Boolean.parseBoolean(s))); } catch (Exception ignore) { } final boolean serverSide = ResteasyProviderFactory.searchContextData(Dispatcher.class) != null; if (originalBehavior || !serverSide) { return e; } if (e instanceof WebApplicationExceptionWrapper) { return e; } if (e instanceof BadRequestException) { return new ResteasyBadRequestException((BadRequestException) e); } if (e instanceof NotAuthorizedException) { return new ResteasyNotAuthorizedException((NotAuthorizedException) e); } if (e instanceof ForbiddenException) { return new ResteasyForbiddenException((ForbiddenException) e); } if (e instanceof NotFoundException) { return new ResteasyNotFoundException((NotFoundException) e); } if (e instanceof NotAllowedException) { return new ResteasyNotAllowedException((NotAllowedException) e); } if (e instanceof NotAcceptableException) { return new ResteasyNotAcceptableException((NotAcceptableException) e); } if (e instanceof NotSupportedException) { return new ResteasyNotSupportedException((NotSupportedException) e); } if (e instanceof InternalServerErrorException) { return new ResteasyInternalServerErrorException((InternalServerErrorException) e); } if (e instanceof ServiceUnavailableException) { return new ResteasyServiceUnavailableException((ServiceUnavailableException) e); } if (e instanceof ClientErrorException) { return new ResteasyClientErrorException((ClientErrorException) e); } if (e instanceof ServerErrorException) { return new ResteasyServerErrorException((ServerErrorException) e); } if (e instanceof RedirectionException) { return new ResteasyRedirectionException((RedirectionException) e); } return new ResteasyWebApplicationException(e); }