Structured exception raised by evaluate!/3 and JevDSL.Runner.evaluate!/4 when a
JevDSL contract evaluation fails.
Fields
:type- Error classification atom (:no_api_key,:cache_miss,:unknown_contract,:invalid_options, or:evaluation_failed).:message- Human-readable error message.:contract- The contract key (atom or string) being evaluated, if applicable.:details- Additional error context or underlying failure term.
Summary
Functions
Builds a :cache_miss exception when cache_only: true is set and the evaluation is not in L1/L2 cache.
Converts an error reason from evaluate/3 into a raisable exception (JevDSL.Error or SystemOneSDK.Error).
Builds an :invalid_options exception when invalid options are supplied.
Builds a :no_api_key exception when neither a TYPESAFE_API_KEY nor an offline cache/mock is available.
Builds an :unknown_contract exception when a contract key is not defined on the module.
Types
@type error_type() ::
:no_api_key
| :cache_miss
| :unknown_contract
| :invalid_options
| :evaluation_failed
@type t() :: %JevDSL.Error{ __exception__: true, contract: atom() | String.t() | nil, details: term(), message: String.t(), type: error_type() }
Functions
Builds a :cache_miss exception when cache_only: true is set and the evaluation is not in L1/L2 cache.
@spec from_reason(term(), atom() | String.t() | nil) :: Exception.t()
Converts an error reason from evaluate/3 into a raisable exception (JevDSL.Error or SystemOneSDK.Error).
Builds an :invalid_options exception when invalid options are supplied.
Builds a :no_api_key exception when neither a TYPESAFE_API_KEY nor an offline cache/mock is available.
Builds an :unknown_contract exception when a contract key is not defined on the module.