daml
daml copied to clipboard
better error on pruning when passing explicit offsets to WS endpoints
#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
Endpointsto 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
fix json-api documentation that mentions internal error
Can you elaborate on that part @S11001001?
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 if still blocked, what is this issue blocked on?
@ray-roestenburg-da Upstream as discussed in the comments following https://github.com/digital-asset/daml/pull/13788#issuecomment-1129119219.