Skip to content

@nhtio/lucid-resourceful/errors

Errors thrown by the Lucid Resourceful Library

Classes

ClassDescription
CHECK_CONSTRAINT_VIOLATION-
DATA_VALIDATION_ERROR-
DATABASE_CONNECTION_ERROR-
DEADLOCK-
DIVISION_BY_ZERO-
E_BULK_UPDATE_SEARCH_UNKNOWN_EXCEPTION-
E_EXPAND_NOT_IMPLEMENTED-
E_FORBIDDEN-
E_FORBIDDEN_PAYLOAD_EXCEPTION-
E_INVALID_AGGREGATION_FIELDException thrown when an invalid field is specified for aggregation operations.
E_INVALID_AGGREGATION_OPERATIONException thrown when an invalid aggregation operation is specified for a field.
E_INVALID_COLUMN_ACCESS-
E_INVALID_ENTITYSET_IDENTIFIERS-
E_INVALID_LUCENE_QUERY-
E_INVALID_PAYLOAD_EXCEPTION-
E_INVALID_RELATIONSHIP_EXCEPTION-
E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS-
E_INVALID_RESOURCEFUL_DECORATOR_OPTIONS-
E_INVALID_RESOURCEFUL_MIXIN_OPTIONS-
E_INVALID_RESOURCEFUL_MODELS_MAP-
E_INVALID_RESOURCEFUL_MODELS_MAP_AGGREGATE-
E_INVALID_RESOURCEFUL_ROUTER_OPTIONS-
E_INVALID_RESOUREFUL_INDEX_REQUEST_EXCEPTION-
E_INVALID_RESOUREFUL_READ_RELATIONSHIP_REQUEST_EXCEPTION-
E_LUCENE_INVALID_TYPE-
E_LUCENE_REGEX_NOT_SUPPORTED-
E_LUCENE_SYNTAX_EXCEPTION-
E_LUCENE_UNEXPECTED_EXCEPTION-
E_MISSING_PRIMARY_KEY_EXCEPTION-
E_NOT_IN_MODEL_CONTEXT-
E_NOT_IN_ODATA_CONTEXT-
E_ODATA_FILTER_EXPECTED_COLUMN_REFERENCE-
E_ODATA_FILTER_INAPPLICABLE_NODE_TYPE-
E_ODATA_FILTER_INVALID_COMPARISON_SIDE-
E_ODATA_FILTER_UNEVALUATABLE_NODE_TYPE-
E_ODATA_FILTER_UNEXPECTED_CHARACTER-
E_ODATA_FILTER_UNEXPECTED_END_OF_INPUT-
E_ODATA_FILTER_UNEXPECTED_TOKEN-
E_ODATA_FILTER_UNEXPECTED_TYPE-
E_ODATA_FILTER_UNKNOWN_COMPARISON_OPERATOR-
E_ODATA_FILTER_UNKNOWN_LOGICAL_OPERATOR-
E_ODATA_FILTER_UNSUPPORTED_FUNCTION_COMPARISON-
E_ODATA_UNKNOWN_PARAMETER_ALIAS-
E_RECORD_NOT_FOUND_EXCEPTION-
E_RELATION_CACHE_EVICTION_FAILEDA write-through eviction (deleteByTag) failed; the business write still commits, staleness stays TTL-bounded (ADR-009).
E_RELATION_CACHE_KEY_DIVERGENCEThrown when a cached belongsTo relation's localKey differs from the related model's primaryKey. The relation cache keys a belongsTo lookup by the parent FK value (the related row's localKey) but tags the stored entry by the related row's primaryKey; when these diverge the lookup key and eviction tag describe different rows, so a cached entry could serve the wrong row. The cache fails loud here rather than risk returning incorrect data.
E_RELATION_CACHE_OPERATION_FAILEDBase class for every RUNTIME relation-cache operational failure routed through the onRelationsCacheError handler (ADR-009). Subclasses pin a per-site code; the original throw is preserved as cause and structured context as context, so a handler can instanceof / switch on .code and inspect .cause/.context.
E_RELATION_CACHE_READ_FAILEDA cache read (get) failed; the load degrades to an uncached DB load (ADR-009).
E_RELATION_CACHE_REHYDRATION_FAILEDRehydrating a cached snapshot into a model instance failed (a poisoned/incompatible entry); the load degrades to an uncached DB load that overwrites the entry (ADR-009).
E_RELATION_CACHE_RESOLUTION_FAILEDResolving the cache service (the host resolver threw, or the app/cache was unreachable) failed; the load degrades to an uncached DB load (ADR-009).
E_RELATION_CACHE_WRITE_FAILEDA cache write-back (set) failed on a miss; caching is skipped, the fetched row is still returned (ADR-009).
E_RELATIONSHIP_NOT_FOUND_EXCEPTION-
E_RESOURCEFUL_ROUTER_MISCONFIGURED-
E_UNACCEPTABLE_FORMAT-
E_UNEXPECTED_COLUMN_IN_QUERY-
E_UNRESOLVABLE_MODEL-
E_UNSUPPORTED_DATABASE_DIALECT-
E_UNSYNCABLE_RELATIONSHIP_EXCEPTION-
FOREIGN_KEY_VIOLATION-
INVALID_DATA_TYPE-
LOCK_TIMEOUT-
NOT_NULL_VIOLATION-
PERMISSION_DENIED-
QUERY_SYNTAX_ERROR-
SCHEMA_ERROR-
SERIALIZATION_FAILURE-
UNIQUE_CONSTRAINT_VIOLATION-

Interfaces

InterfaceDescription
RelationCacheErrorContextStructured context attached to every runtime relation-cache operational failure (ADR-009). Identifies the model whose error handler is consulted, plus the relation / lookup key / eviction tag the failing operation concerned.

Variables

VariableDescription
E_ENCODED_BODY_PARSING_FAILED-
E_INVALID_CONSUMED_VALUE-
E_INVALID_HTTP_METHOD_EXCEPTION-
E_INVALID_PREPARED_VALUE-
E_MISSING_CURRENT_INSTANCE_ID-
E_ROUTE_NOT_FOUND-
E_UNCASTABLE-