-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
converting server errors to proper client errors #11184
Merged
Merged
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
314026b
a model for trapping client errors in Scala bindings shim and reporti…
S11001001 a9c4e00
clean up some nesting with an alias
S11001001 f9062b7
filter out client-side command service errors
S11001001 dfbdcb0
fix flattening error propagation of CommandService errors in endpoints
S11001001 b115e4a
remove todo
S11001001 f10f0a3
Daml evaluation triggers INVALID_ARGUMENT; handle this for creates/ex…
S11001001 ec16d19
clean up lookupResult
S11001001 02bb076
remove stripLeft utility; it is unused
S11001001 afbbe64
proper error propagation for /parties endpoint
S11001001 ddd199a
Merge commit 'b7389885e8ae2e97c34b8cdbc7dc7b11d9330c64' into 11154-fe…
S11001001 24388a6
map grpc status codes to HTTP error codes
S11001001 4291e39
add a case to pass-through gRPC errors in Endpoints errors
S11001001 828ffe8
handle gRPC status in all explicit top-level catches
S11001001 0589aff
pass through gRPC errors in CommandService as well
S11001001 9f89ef3
treat a gRPC status anywhere in the causal chain as indicating partic…
S11001001 c6978ff
propagate ContractsService errors without assuming they will always b…
S11001001 b5f7f4b
filter ServerErrors' contents when rendering errorful streams
S11001001 845a948
log errors from websocket output instead of rendering full messages
S11001001 4f7a9d6
hide message in ServerError case
S11001001 2715a4f
remove Aborted
S11001001 3d1a543
Merge commit '46f6877ee5688ec9bd3ff3229d7827af2e865eff' into 11154-fe…
S11001001 facbb44
transfer with bad contract ID now returns 409
S11001001 68ad766
mention new error codes
S11001001 e98e86a
add changelog
S11001001 ac5c643
remove unused Show and liftErr utility
S11001001 e5b0e0e
adapt daml-script to new error codes
S11001001 7115456
adapt typescript tests to new error codes
S11001001 56aba1c
adapt json-api failure tests to new error codes
S11001001 eb6387c
Merge commit '9b00a1aab5ac1f4b9058739a91ca02597d84dda5' into 11154-fe…
S11001001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just pick one
Error
/InternalError
given any issues here (ContractsService
) should always be mapped as server error, can you explain the notion for the additional type ? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now we only have one error constructor so I would rather it not be a sum type. However, that isn't guaranteed, i.e.
is not an invariant, it is a coincidence of the current implementation, so since I went to the trouble of determining that particular expressions were constructing internal errors, I should go ahead and document that fact (with actual typed expressions, not comments, as is my wont).
So should we need to split the type and add a client error data ctor, the existing invocations already self-document that they don't use the new client error ctor.