Exception: Insika::ConfigError
- Defined in:
- lib/insika/errors.rb
Overview
Strict configuration violation (item 23 / §8.1 — OpenClaw's config discipline:
"recusa boot com chave desconhecida, no silent config compat"). Raised by
EnvSchema.enforce! at boot ONLY when strictness is on (INSIKA_CONFIG_STRICT) —
by default a bad key WARNS and the engine still boots (last-known-good: a rotated
env or a typo never takes the whole service down). findings carries the
per-key detail (EnvSchema::Finding) so the operator can fix the config.
Instance Attribute Summary collapse
-
#findings ⇒ Object
readonly
Returns the value of attribute findings.
Instance Method Summary collapse
-
#initialize(message = nil, findings: []) ⇒ ConfigError
constructor
A new instance of ConfigError.
Constructor Details
#initialize(message = nil, findings: []) ⇒ ConfigError
Returns a new instance of ConfigError.
138 139 140 141 142 143 |
# File 'lib/insika/errors.rb', line 138 def initialize( = nil, findings: []) @findings = findings || [] detail = @findings.map { |f| f.respond_to?(:message) ? f. : f.to_s }.join("; ") base = || "strict config check failed" super(detail.empty? ? base : "#{base}: #{detail}") end |
Instance Attribute Details
#findings ⇒ Object (readonly)
Returns the value of attribute findings.
136 137 138 |
# File 'lib/insika/errors.rb', line 136 def findings @findings end |