def classify_write_before

mylsm-lsm-store@0.6.0.1 · src/DurableError.bend:99

import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError
import Base

99# Classifies failures that occur before WAL append begins.
100def classify_write_before(cause: WriteCause, operation: String, path: String) -> Error:
101  match cause:
102    case ValidationFailure{}:
103      error(InvalidArgument{}, operation, path, 0, "")
104    case WriteLimitReached{}:
105      error(ResourceLimit{}, operation, path, 0, "")
106    case WriteHostFailure{code, message}:
107      error(Io{}, operation, path, code, message)

Uses (5)

Used by (1)