#1 2019-12-17 10:21:53

asmirnov
Member
Registered: 2018-06-05

Error message configuration (hide error details from user)

Could you please advise how to set up error message?
I  would like to hide technical error details from users, but cannot find a way to do it.

Having following  content in templates.cf file (config was reloaded and server was restarted after update):

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <errors>
      <html>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
&lt;head&gt;
&lt;title&gt;${msgs['net.datenwerke.rs.core.client.locale.ReportServerMessages']['htmlErrorPageTitle']}&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;${baseurl}/rstheme&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;${baseurl}/../resources/rs-logo-font/style.css&quot; /&gt;
&lt;/head&gt;
&lt;body &gt;

&lt;/body&gt;
&lt;/html&gt;</html>
   </errors>
</configuration>

I'm getting error with detailed error message:

Error
Query could not be executed: ERROR: syntax error at or near "." Position: 59
display error details
net.datenwerke.gxtdto.client.servercommunication.exceptions.NonFatalException: Query could not be executed: ERROR: syntax error at or near &quot;.&quot;<br>  Position: 59<br>    at net.datenwerke.rs.base.server.table.TableReportUtilityServiceImpl.getReturnedColumns(TableReportUtilityServiceImpl.java:221)<br>    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>    at java.lang.reflect.Method.invoke(Method.java:498)<br>    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)<br>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)<br>    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)<br>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)<br>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)<br>    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)<br>    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)<br>    at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)<br>    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)<br>    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)<br>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)<br>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)<br>    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)<br>    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)<br>    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)<br>    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)<br>    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)<br>    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)<br>    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)<br>    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)<br>    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)<br>    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)<br>    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)<br>    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)<br>    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)<br>    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)<br>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)<br>    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<br>    at java.lang.Thread.run(Thread.java:748)<br>Caused by: net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: Query could not be executed: ERROR: syntax error at or near &quot;.&quot;<br>  Position: 59<br>    at net.datenwerke.rs.base.service.datasources.table.impl.TableDBDataSource.open(TableDBDataSource.java:276)<br>    at net.datenwerke.rs.base.service.reportengines.table.TableReportEngine.createReport(TableReportEngine.java:258)<br>    at net.datenwerke.rs.base.service.reportengines.table.TableReportEngine.doExecuteNormal(TableReportEngine.java:191)<br>    at net.datenwerke.rs.base.service.reportengines.table.TableReportEngine.doExecuteNormal(TableReportEngine.java:151)<br>    at net.datenwerke.rs.base.service.reportengines.table.TableReportEngine.doExecute(TableReportEngine.java:88)<br>    at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:150)<br>    at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186)<br>    at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119)<br>    at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:106)<br>    at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:101)<br>    at net.datenwerke.rs.base.service.reportengines.table.TableReportUtilsImpl.getReturnedColumns(TableReportUtilsImpl.java:180)<br>    at net.datenwerke.rs.base.service.reportengines.table.TableReportUtilsImpl.getReturnedPlainColumns(TableReportUtilsImpl.java:144)<br>    at net.datenwerke.rs.base.server.table.TableReportUtilityServiceImpl.getReturnedColumns(TableReportUtilityServiceImpl.java:217)<br>    ... 52 more<br>Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near &quot;.&quot;<br>  Position: 59<br>    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)<br>    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)<br>    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)<br>    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)<br>    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)<br>    at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)<br>    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1418)<br>    at net.datenwerke.rs.base.service.datasources.table.impl.TableDBDataSource.open(TableDBDataSource.java:271)<br>    ... 64 more<br>

Last edited by asmirnov (2019-12-17 10:28:19)

Offline

#2 2019-12-17 11:51:04

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error message configuration (hide error details from user)

Hi asmirnov,

where exactly is the user getting the technical details you are trying to hide? In the scheduler / per email or where exactly?

Regards,
Eduardo

Offline

#3 2019-12-17 12:04:19

asmirnov
Member
Registered: 2018-06-05

Re: Error message configuration (hide error details from user)

User is getting error right in the session, while report executed. This exception raises on column selection in dynamic list
It's just an example. For debugging

Last edited by asmirnov (2019-12-17 12:13:19)

Offline

#4 2019-12-24 13:06:25

asmirnov
Member
Registered: 2018-06-05

Re: Error message configuration (hide error details from user)

Hello.
Any ideas on this?

Offline

#5 2020-01-02 08:57:44

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error message configuration (hide error details from user)

Hi asmirnov,

this seems to work only in some cases (working with some scripts), but not with general errors. I raised ticket RS-3868 for this purpose and will update here when I have more information.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB