daml icon indicating copy to clipboard operation
daml copied to clipboard

better error on pruning when passing explicit offsets to WS endpoints

Open S11001001 opened this issue 3 years ago • 4 comments
trafficstars

#13633 yields an internal error message from websockets on pruning.

https://github.com/digital-asset/daml/blob/02677d29cb1c30d93db084ad688345e9805bb283/ledger-service/http-json/src/itlib/scala/http/AbstractWebsocketServiceIntegrationTest.scala#L977-L991

Instead, we should emit a useful [still string] error message that indicates a pruning error. We don't have to indicate which queries in a multi-query failed, just that the WS request failed for this reason.

This is probably due to gRPC exceptions not propagating upward properly to Endpoints, where they ought to go through the EndpointsCompanion.Error.fromThrowable mechanism that all requests' errors ought to go through.

  • [ ] check whether we can improve this handling in Endpoints to direct such errors to the aforementioned error-mapping mechanism
  • [ ] fix json-api documentation that mentions internal error

Originally posted by @S11001001 in https://github.com/digital-asset/daml/issues/13506#issuecomment-1103089781

S11001001 avatar Apr 25 '22 15:04 S11001001

fix json-api documentation that mentions internal error

Can you elaborate on that part @S11001001?

realvictorprm avatar May 04 '22 12:05 realvictorprm

Can you elaborate on that part @S11001001?

@realvictorprm If you search for internal error in json-api/index.rst you'll find the current documentation of the error; changing the message means we should change that paragraph.

S11001001 avatar May 10 '22 17:05 S11001001

@S11001001 if still blocked, what is this issue blocked on?

ray-roestenburg-da avatar Sep 12 '22 08:09 ray-roestenburg-da

@ray-roestenburg-da Upstream as discussed in the comments following https://github.com/digital-asset/daml/pull/13788#issuecomment-1129119219.

S11001001 avatar Sep 12 '22 15:09 S11001001