Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use err result to send errors back to client
Previously the mechanism for handling errors in `handle_valid_service_msg` was to return an `Ok` result with an empty list of commands, or if you wanted to send an error response back to the client, to include a command in that `Ok` result. A new `CmdProcessingClientRespondError` variant is added to `Error` to enable returning an `Err` result when we want to return an error back to the client. When the command processing code encounters this error variant, it will process the commands included in the error, which will be the information to send back to the client. The intention is also to return `Err` results from `handle_valid_service_msg` when any errors are encountered, not just for the limited few we want to send back to the client.
- Loading branch information
Showing
6 changed files
with
31 additions
and
10 deletions.
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
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