Struct ErrorInfo
Defined in File error_info.hpp
Struct Documentation
-
struct ErrorInfo
Transport-neutral error descriptor used by the SOVD provider interfaces.
Returned as the error branch of
tl::expected<T, ErrorInfo>by provider methods (Data, Operation, Fault, DataStream, Log). The handler layer translates this into a SOVD-compliant GenericError response.- Contract
http_statusmust be in the SOVD error range (400-599). The handler layer clamps out-of-range values and logs a warning.codeis the SOVD error code constant (see error_codes.hpp) or a vendor-specificx-medkit-*code.paramsis an optional JSON object with structured diagnostic parameters. Must be serializable and must not contain sensitive information.
- Thread safety
Plain value type; safe to copy and move across threads without synchronization.
Public Members
-
std::string code
SOVD error code (e.g. ERR_RESOURCE_NOT_FOUND, ERR_X_MEDKIT_ROS2_TOPIC_UNAVAILABLE)
-
std::string message
Human-readable message (truncated to 512 chars by handlers)
-
int http_status = {500}
HTTP status in SOVD range 400-599.
-
nlohmann::json params = nlohmann::json::object()
Optional structured parameters.