Skip to main content

Module error

Module error 

Source
Expand description

Errors surfaced by the routing crate.

§Why routing has its own error type

Before 5.0, every failure in apimock funnelled into a single AppError. That’s natural for a single-crate project but awkward across a workspace, because apimock-routing shouldn’t have to know about TLS failures or listener-address parsing — those are server-layer concerns. Each of the three crates now defines its own error variants at the right abstraction level:

  • apimock-routing::RoutingError — rule-set read / parse
  • apimock-config::ConfigError — config read / parse, middleware compile, path resolution; wraps RoutingError when the failure came from a rule set
  • apimock-server::ServerError — TLS load, listener address

The façade crate (apimock) re-exports all three under one convenience alias (AppError) for existing consumers.

Enums§

RoutingError
All fatal errors produced by routing-layer operations.

Type Aliases§

RoutingResult
Result alias used inside this crate.