daml/ledger-service
Stephen Compall f4df1cc4d0
converting server errors to proper client errors (#11184)
* a model for trapping client errors in Scala bindings shim and reporting correctly

* clean up some nesting with an alias

* filter out client-side command service errors

* fix flattening error propagation of CommandService errors in endpoints

* remove todo

* Daml evaluation triggers INVALID_ARGUMENT; handle this for creates/exercises

* clean up lookupResult

* remove stripLeft utility; it is unused

* proper error propagation for /parties endpoint

* map grpc status codes to HTTP error codes

* add a case to pass-through gRPC errors in Endpoints errors

* handle gRPC status in all explicit top-level catches

* pass through gRPC errors in CommandService as well

* treat a gRPC status anywhere in the causal chain as indicating participant-server error

* propagate ContractsService errors without assuming they will always be ServerErrors

* filter ServerErrors' contents when rendering errorful streams

* log errors from websocket output instead of rendering full messages

* hide message in ServerError case

* remove Aborted

* transfer with bad contract ID now returns 409

* mention new error codes

* add changelog

CHANGELOG_BEGIN
- [JSON API] Several kinds of gRPC server errors are now reported with
  associated HTTP statuses; for example, a Daml-LF interpreter error now
  returns a 400 instead of a 500, and an exercise on an archived contract
  returns a 409 Conflict instead of a 500.  Errors internal to JSON API
  (e.g. internal assertion failures) are no longer detailed in the HTTP
  response; their details are only logged.
  See `issue #11184 <https://github.com/digital-asset/daml/pull/11184>`__.
CHANGELOG_END

* remove unused Show and liftErr utility

* adapt daml-script to new error codes

* adapt typescript tests to new error codes

* adapt json-api failure tests to new error codes
2021-10-19 13:54:29 -04:00
..
cli-opts Simplify loading of logback file (#10592) 2021-08-17 08:46:37 +00:00
db-backend Bump the schema version for the JSON API (#11252) 2021-10-15 13:53:18 +02:00
fetch-contracts move reusable functions from ContractsFetch to new fetch-contracts library (#11057) 2021-10-05 15:52:18 +00:00
http-json converting server errors to proper client errors (#11184) 2021-10-19 13:54:29 -04:00
http-json-cli Optional table prefix for trigger service (#11047) 2021-10-04 17:02:36 +00:00
http-json-ledger-client [JSON-API] Use the token from incoming requests to update the package list (#10602) 2021-09-03 10:12:01 +00:00
http-json-oracle move reusable functions from ContractsFetch to new fetch-contracts library (#11057) 2021-10-05 15:52:18 +00:00
http-json-perf move reusable functions from ContractsFetch to new fetch-contracts library (#11057) 2021-10-05 15:52:18 +00:00
http-json-testing HttpServiceTestFixture provides a sandbox-classic ledger used for performance tests (#11128) 2021-10-05 21:10:09 +01:00
jwt [DPP-418] Protect Participant TLS keys (#10629) 2021-08-30 09:24:52 +02:00
lf-value-json Drop ContractId typeparameter from Value (#10827) 2021-09-16 08:46:57 +00:00
utils [JSON-API] Use the token from incoming requests to update the package list (#10602) 2021-09-03 10:12:01 +00:00