glome/core/error
Types
pub type GlomeError {
WebsocketConnectionError(reason: String)
JsonDecodeError(reason: String)
AuthenticationError(reason: String)
DeserializationError(cause: GlomeError, reason: String)
EntityIdFormatError(reason: String)
CallServiceError(reason: String)
NotAllowedHttpMethod
BadRequest(message: String)
NotFound(message: String)
LoopNil
}
Constructors
-
WebsocketConnectionError(reason: String)
-
JsonDecodeError(reason: String)
-
AuthenticationError(reason: String)
-
DeserializationError(cause: GlomeError, reason: String)
-
EntityIdFormatError(reason: String)
-
CallServiceError(reason: String)
-
NotAllowedHttpMethod
-
BadRequest(message: String)
-
NotFound(message: String)
-
LoopNil
Functions
pub fn json_decode_error(reason: String) -> GlomeError
pub fn map_connection_error(error: Result(a, ConnectError)) -> Result(
a,
GlomeError,
)
pub fn map_decode_error(error: Result(a, DecodeError)) -> Result(
a,
GlomeError,
)
pub fn map_decode_errors(errors: Result(a, List(DecodeError))) -> Result(
a,
GlomeError,
)
pub fn stringify_decode_error(error: DecodeError) -> String