Typed error codes and structured error data #5
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_rpc!5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_typed_error_codes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add named error code constants and structured data field to the JSON-RPC error types.
Changes
error_codesmodule injsonrpc.rs— named constants for all JSON-RPC 2.0 codes andAPPLICATION_ERRORJsonRpcError.datachanged fromOption<String>toOption<Value>is_application_error()andis_method_not_found()helpers onJsonRpcErrorpub mod error_codesin clientlib.rsfor consumer-side error discriminationdata: Option<Value>added to internal clientRpcErrordeserialization structTesting
cargo checkpasses clean (one pre-existing dead_code warning in generators)Closes #4
WIP: Typed error codes and structured error datato Typed error codes and structured error dataPull request closed