Exception: Insika::ConfigError
- Defined in:
- lib/insika/errors.rb
Overview
Strict configuration violation (— 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.
194 195 196 197 198 199 |
# File 'lib/insika/errors.rb', line 194 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.
192 193 194 |
# File 'lib/insika/errors.rb', line 192 def findings @findings end |