Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error Codes

Every GasHammer error carries a structured code in the format GH-Exxx. The prefix GH-E is part of GasHammer’s structural DNA (RFC-0011 §8.3). Codes are unique across the entire codebase and grouped by crate.

Code Ranges

RangeCrateCategory
E001–E099gashammer-commonShared infrastructure
E100–E199gashammer-nitroNitro protocol adapters
E200–E299gashammer-edgeEdge runtime
E300–E399gashammer-hiveHive control plane
E400–E499gashammer-workloadWorkload engine
E500–E599gashammer-telemetryTelemetry pipeline
E600–E699gashammer-oracleCorrectness oracle
E700–E799gashammer-faultFault injection
E800–E899gashammer-reportReporting engine
E900–E949gashammer-scenarioSDL parser/compiler
E950–E979gashammer-docgenDocumentation engine
E980–E999gashammer-testenvTest environment

Complete Registry

Common (E001–E099)

CodeNameDescription
GH-E001ConfigErrorConfiguration loading or validation failed
GH-E002SerializationErrorSerialization or deserialization failed
GH-E003InvariantViolationAn internal invariant was violated

Nitro (E100–E199)

CodeNameDescription
GH-E100RpcErrorJSON-RPC call failed
GH-E101FeedErrorSequencer feed connection or parsing failed
GH-E102L1ContractErrorL1 contract read failed

Edge (E200–E299)

CodeNameDescription
GH-E200EdgeRegistrationFailedEdge failed to register with the hive
GH-E201TxPipelineErrorTransaction pipeline error
GH-E202FeedCorrelationErrorFeed correlation error

Hive (E300–E399)

CodeNameDescription
GH-E300OrchestrationErrorRun orchestration failed
GH-E301EdgeRegistryErrorEdge registry operation failed
GH-E302ApiErrorREST API error

Workload (E400–E499)

CodeNameDescription
GH-E400TemplateErrorTransaction template construction failed
GH-E401RateControlErrorRate control error
GH-E402AccountPoolErrorAccount pool exhausted or nonce error

Telemetry (E500–E599)

CodeNameDescription
GH-E500EventShippingErrorEvent shipping failed
GH-E501StorageWriteErrorParquet storage write failed
GH-E502MetricErrorMetric registration or recording failed

Oracle (E600–E699)

CodeNameDescription
GH-E600CheckExecutionErrorInvariant check execution failed
GH-E601EvidenceErrorEvidence collection failed
GH-E602VerdictAggregationErrorVerdict aggregation error

Fault (E700–E799)

CodeNameDescription
GH-E700FaultInjectionErrorFault injection failed
GH-E701FaultReversionErrorFault reversion (clear) failed
GH-E702FaultSchedulingErrorFault scheduling error

Report (E800–E899)

CodeNameDescription
GH-E800ReportGenerationErrorReport generation failed
GH-E801RegressionAnalysisErrorRegression analysis failed
GH-E802ReportTemplateErrorTemplate rendering failed

Scenario (E900–E949)

CodeNameDescription
GH-E900ScenarioParseErrorScenario YAML parsing failed
GH-E901ScenarioValidationErrorScenario validation failed
GH-E902ScenarioCompilationErrorScenario compilation failed

Docgen (E950–E979)

CodeNameDescription
GH-E950SourceParseErrorSource file parsing failed
GH-E951DocgenTemplateErrorTemplate rendering failed
GH-E952DocgenOutputErrormdBook output write failed

Testenv (E980–E999)

CodeNameDescription
GH-E980ContainerErrorContainer startup failed
GH-E981HealthCheckErrorDevnet health check failed
GH-E982ContractDeployErrorContract deployment failed

Using Error Codes

All error types use thiserror and embed the error code in the Display impl:

#![allow(unused)]
fn main() {
#[derive(Debug, thiserror::Error)]
pub enum NitroError {
    #[error("[{code}] {msg}", code = ErrorCode::RpcError.code())]
    Transport(String),
    // ...
}
}

In log output and API responses, errors appear as:

[GH-E100] RPC call failed: connection refused

Search logs for a specific code with grep "GH-E100" to find all instances of a particular error class.