Can't Customize SMS Error Message

Bug and problem reporting on Cyclos 4 version

Moderators: hugo, alexandre, rmvanarkel

Post Reply
Shiyghan
Posts: 39
Joined: Thu Jun 16, 2016 9:16 am
Location: London
Contact:

Can't Customize SMS Error Message

Post by Shiyghan »

The following error is displayed when a request for Account Information is executed against an account that does not exist.

"There was an unexpected error while processing the SMS operation"

I would like to customize this error message and have done this for all occurrences in the language file, but it seems it may be hardcoded somewhere.

This is the stake trace

20:20:44,304 ERROR InboundSmsHandlerImpl - Error while executing inbound SMS operation phone: +447966265130, command: Offlicensepoints, alias: Offlicensepoints, parameters: []
org.cyclos.impl.utils.sms.SmsOperationException: org.cyclos.model.EntityNotFoundException: UserAccount
at org.cyclos.impl.utils.sms.BaseSmsOperation.handleError(BaseSmsOperation.java:217)
at org.cyclos.impl.utils.sms.BaseSmsOperation.execute(BaseSmsOperation.java:139)
at org.cyclos.impl.utils.sms.InboundSmsHandlerImpl$1.run(InboundSmsHandlerImpl.java:385)
at org.cyclos.server.utils.CallableRunnable.call(CallableRunnable.java:47)
at org.cyclos.server.utils.CallableRunnable.call(CallableRunnable.java:33)
at org.cyclos.impl.InvokerHandlerImpl.runAs(InvokerHandlerImpl.java:371)
at org.cyclos.impl.utils.sms.InboundSmsHandlerImpl.doExecuteSms(InboundSmsHandlerImpl.java:382)
at org.cyclos.impl.utils.sms.InboundSmsHandlerImpl.lambda$executeSms$0(InboundSmsHandlerImpl.java:421)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.runEnsuringInvocationContext(TransactionHandlerImpl.java:194)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.doRun(TransactionHandlerImpl.java:115)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:170)
at org.cyclos.impl.utils.transaction.TransactionHandlerImpl.run(TransactionHandlerImpl.java:84)
at org.cyclos.impl.InvokerHandlerImpl.performInTransaction(InvokerHandlerImpl.java:533)
at org.cyclos.impl.InvokerHandlerImpl.doRunAsInTransaction(InvokerHandlerImpl.java:482)
at org.cyclos.impl.InvokerHandlerImpl.runAsInTransaction(InvokerHandlerImpl.java:427)
at org.cyclos.impl.utils.sms.InboundSmsHandlerImpl.executeSms(InboundSmsHandlerImpl.java:420)
at org.cyclos.impl.utils.sms.InboundSmsHandlerImpl.handleInboundSms(InboundSmsHandlerImpl.java:264)
at org.cyclos.impl.access.ServiceFacadeImpl.handleInboundSms(ServiceFacadeImpl.java:148)
at org.cyclos.server.spring.sms.SmsHttpRequestHandler.handleRequest(SmsHttpRequestHandler.java:55)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
at org.cyclos.server.http.RequestDataFilter.doFilterInternal(RequestDataFilter.java:196)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.cyclos.server.http.RequestContextFilter.doFilterInternal(RequestContextFilter.java:52)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.cyclos.server.http.CORSFilter.doFilterInternal(CORSFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.cyclos.model.EntityNotFoundException: UserAccount
at org.cyclos.impl.utils.persistence.DBQuery.requiredUniqueResult(DBQuery.java:236)
at org.cyclos.impl.banking.AccountServiceImpl.load(AccountServiceImpl.java:1661)
at org.cyclos.impl.utils.sms.AccountInformationSmsOperation.doExecute(AccountInformationSmsOperation.java:95)
at org.cyclos.impl.utils.sms.BaseSmsOperation.execute(BaseSmsOperation.java:135)
... 73 more
Skype senavti
alejandro
Posts: 4
Joined: Tue Oct 16, 2012 10:19 am

Re: Can't Customize SMS Error Message

Post by alejandro »

Hi Shiyghan, The problem was solved in Cyclos4.7. You will have The key NOTIFICATIONS.sms.ACCOUNT_INFORMATION.error.NOT_ACCESSIBLE_ACCOUNT to customize the response sms message for this error.
Post Reply