Issue #6 resolved

Uncaught exception thrown by REST service

Don Willis
created an issue

On our local instance, running a snapshot of Confluence 5.0 and HipChat (com.atlassian.labs.hipchat.confluence-hipchat, Version: 1.3.6, Installed: Oct 19, 2012)

We get lots of these in the logs:

2012-11-26 08:21:11,225 ERROR [http-9082-21] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service
 -- url: /rest/hipchatproxy/1/user/show *** snipped by Issue Reporter ***
javax.ws.rs.WebApplicationException
        at com.atlassian.labs.hipchat.components.HipChatProxyClient$ResponseBodyReturningHandler.handle(HipChatProxyClient.java:181)
        at com.atlassian.labs.hipchat.components.HipChatProxyClient$ResponseBodyReturningHandler.handle(HipChatProxyClient.java:177)

Comments (5)

  1. Don Willis reporter

    It throws an error when the user isn't in hipchat. Whether or not they ever have been.

    I turned on logging for "atlassian.plugin", which is the name of the logger that should be called com.atlassian.labs.hipchat.components.HipChatProxyClient.

    That exception gets thrown whenever the user doesn't exist. This shouldn't log anything or throw any exceptions. This should just return a valid result saying that hipchat doesn't recognise the user

    @4000000050c687d534f4e474 2012-12-11 12:09:31,870 DEBUG [TP-Processor12] [atlassian.plugin] handle Unsuccessful response from hipchat : {"error":{"code":404,"type":"Not Found","message":"User not found: stefan beac-deploy-user@saasen.me"}} @4000000050c687d534f4f414 2012-12-11 12:09:31,872 ERROR [TP-Processor12] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service @4000000050c687d534f4f7fc -- url: /wiki/rest/hipchatproxy/1/user/show | userName: dwillis | referer: https://pug.jira.com/wiki/display/CONFDEV/2012/03/21/Remote+Apps+plugin+now+live+on+PUG @4000000050c687d534f522f4 javax.ws.rs.WebApplicationException @4000000050c687d534f522f4 at com.atlassian.labs.hipchat.components.HipChatProxyClient$ResponseBodyReturningHandler.handle(HipChatProxyClient.java:181) @4000000050c687d534f526dc at com.atlassian.labs.hipchat.components.HipChatProxyClient$ResponseBodyReturningHandler.handle(HipChatProxyClient.java:177) @4000000050c687d534f52eac at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166) @4000000050c687d534f53294 at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:310) @4000000050c687d534f5367c at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161) @4000000050c687d534f5461c at sun.reflect.GeneratedMethodAccessor383.invoke(Unknown Source) @4000000050c687d534f54a04 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) @4000000050c687d534f54a04 at java.lang.reflect.Method.invoke(Method.java:597) @4000000050c687d534f54dec at com.atlassian.plugins.rest.module.ContextClassLoaderSwitchingProxy.invoke(ContextClassLoaderSwitchingProxy.java:27) @4000000050c687d534f555bc at $Proxy1721.executeAndReturn(Unknown Source) @4000000050c687d534f559a4 at com.atlassian.labs.hipchat.components.HipChatProxyClient.jsonGet(HipChatProxyClient.java:170) @4000000050c687d534f55d8c at com.atlassian.labs.hipchat.components.HipChatProxyClient.getUser(HipChatProxyClient.java:74) @4000000050c687d534f56174 at com.atlassian.labs.hipchat.rest.HipChatUserProxy.getUser(HipChatUserProxy.java:33) @4000000050c687d534f5655c at sun.reflect.GeneratedMethodAccessor1620.invoke(Unknown Source) @4000000050c687d534f56944 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) @4000000050c687d534f56d2c at java.lang.reflect.Method.invoke(Method.java:597) @4000000050c687d534f56d2c at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234) @4000000050c687d534f57ccc at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:100) @4000000050c687d534f580b4 at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) @4000000050c687d534f5849c at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38) @4000000050c687d534f58c6c at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) @4000000050c687d534f58c6c at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:132) @4000000050c687d534f59054 at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:230)

  2. Log in to comment