commercetools / sphere-play-sdk

Java API client and helper classes for building a SPHERE.IO shop on Play 2.2
http://sphere.io
7 stars 6 forks source link

Improve error logging #121

Open butenkor opened 10 years ago

butenkor commented 10 years ago

Currently if time out is reached following stack is being logged:

[error] play - Cannot invoke the action, eventually got an error: io.sphere.client.SphereClientException: Request reached time out of 60000 ms after 60001 ms: Request reached time out of 60000 ms after 60001 ms
[error] application -

! @6jbdjg0ll - Internal server error, for (GET) [/de/herren-clothing] ->

play.api.Application$$anon$1: Execution exception[[SphereClientException: Request reached time out of 60000 ms after 60001 ms: Request reached time out of 60000 ms after 60001 ms]]
    at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.4.jar:2.2.4]
    at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10-2.2.4.jar:2.2.4]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:264) [play_2.10-2.2.4.jar:2.2.4]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:264) [play_2.10-2.2.4.jar:2.2.4]
    at scala.Option.map(Option.scala:145) [scala-library-2.10.4.jar:na]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:264) [play_2.10-2.2.4.jar:2.2.4]
Caused by: io.sphere.client.SphereClientException: Request reached time out of 60000 ms after 60001 ms: Request reached time out of 60000 ms after 60001 ms
    at io.sphere.internal.util.Util.mapSphereException(Util.java:128) ~[sphere-java-client-0.66.0.jar:0.66.0]
    at io.sphere.internal.util.Util.toSphereException(Util.java:121) ~[sphere-java-client-0.66.0.jar:0.66.0]
    at io.sphere.internal.util.Util.sync(Util.java:104) ~[sphere-java-client-0.66.0.jar:0.66.0]
    at io.sphere.internal.request.SearchRequestImpl.fetch(SearchRequestImpl.java:101) ~[sphere-java-client-0.66.0.jar:0.66.0]
    at io.sphere.internal.request.ProductSearchRequest.fetch(ProductSearchRequest.java:32) ~[sphere-java-client-0.66.0.jar:0.66.0]
    at sphere.internal.SearchRequestAdapter.fetch(SearchRequestAdapter.java:22) ~[sphere-play-sdk_2.10-0.66.0.jar:0.66.0]
java.util.concurrent.TimeoutException: Request reached time out of 60000 ms after 60001 ms
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider$ReaperFuture.expire(NettyAsyncHttpProvider.java:1773) ~[async-http-client-1.7.18.jar:na]
    at com.ning.http.client.providers.netty.NettyAsyncHttpProvider$ReaperFuture.run(NettyAsyncHttpProvider.java:1794) ~[async-http-client-1.7.18.jar:na]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_11]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[na:1.8.0_11]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_11]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[na:1.8.0_11]

Would be nice to know which request/action actually timed out.