Module kipa_lib::error [−][src]
Error types used across project
There are four main error/result types used across the project:
kipa_lib::error::{Error, Result}
: Error types created byerror_chain
, used for code that does not directly interact with external agents (e.g. other nodes, CLI).kipa_lib::api::{ApiError, ApiResult}
: Error types that are public-facing (e.g. seen by other nodes and the CLI).kipa_lib::error::{InternalError, InternalResult}
: Error types that can either represent an internal error (PrivateError
) or a public-facing error (PublicError
). These types should be used to propagate errors from functionality that can produce public-facing errors, but can also have internal errors that should not be public-facing. This should be typically used across all request handling until the highest level, when it is converted to an{ApiError, ApiResult}
in order to be sent publicly.kipa_lib::error::{ResponseError, ResponseResult}
: Error types that represent a response from a different node, with two options for errors: either a public error that has been received from the other node, or an error that occurred when receiving this response.
Re-exports
pub use api::ApiError; |
pub use api::ApiErrorType; |
pub use api::ApiResult; |
Structs
Error |
The Error type. |
Enums
ErrorKind |
The kind of an error. |
InternalError |
Representation of an error for internal code |
Traits
ResultExt |
Additional methods for |
Functions
api_to_internal_result |
Convert an API result into an internal result |
to_api_result |
Turn an internal result into a public-facing |
to_internal_result |
Convert a result into an internal result |
Type Definitions
InternalResult |
Result type with |
ResponseError |
Representation of an error that can be caused when getting a response from another node |
ResponseResult |
Result type with |
Result |
Convenient wrapper around |