Skip to main content

Module error

Module error 

Source
Expand description

Make all of lexe_api_core available under [lexe_api].

NOTE: Any crates which can depend on lexe_api_core directly (without lexe-api) should do so to avoid [lexe_api] dependencies. API error types. Serializable api error types and error kinds returned by various lexe services.

Modules§

error_response

Structs§

BackendApiError
CommonApiError
Errors common to all ApiErrors.
ErrorResponse
ErrorResponse is the common JSON-serialized representation for all ApiErrors. It is the only error struct actually sent across the wire. Everything else is converted to / from it.
GatewayApiError
LspApiError
MegaApiError
NodeApiError
RunnerApiError
SdkApiError

Enums§

BackendErrorKind
All variants of errors that the backend can return.
CommonErrorKind
Error variants common to all ApiErrors.
GatewayErrorKind
All variants of errors that the gateway can return.
LspErrorKind
All variants of errors that the LSP can return.
MegaErrorKind
All variants of errors that the LSP can return.
NodeErrorKind
All variants of errors that the node can return.
RunnerErrorKind
All variants of errors that the runner can return.
SdkErrorKind
All variants of errors that the SDK can return.

Constants§

CLIENT_400_BAD_REQUEST
CLIENT_401_UNAUTHORIZED
CLIENT_404_NOT_FOUND
CLIENT_409_CONFLICT
SERVER_500_INTERNAL_SERVER_ERROR
SERVER_502_BAD_GATEWAY
SERVER_503_SERVICE_UNAVAILABLE
SERVER_504_GATEWAY_TIMEOUT

Traits§

ApiError
A ‘trait alias’ defining all the supertraits an API error type must impl to be accepted for use in the RestClient and across all Lexe APIs.
ApiErrorKind
ApiErrorKind defines the methods required of all API error kinds. Implementations of this trait are derived by api_error_kind!.
ToHttpStatus
A trait to get the HTTP status code for a given Error.

Functions§

join_results
Converts a Vec<anyhow::Result<()>> to an anyhow::Result<()>, with any error messages joined by a semicolon.

Type Aliases§

ErrorCode
ErrorCode is the common serialized representation for all ErrorKinds.