Skip to content

Commit 773c1cb

Browse files
committed
add SegmentNotFoundTimestamp error
for where no segment can be found satisfying the timestamp.
1 parent 42a296e commit 773c1cb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libsql-wal/src/storage/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::panic::Location;
22

3+
use chrono::{DateTime, Utc};
4+
35
#[derive(thiserror::Error, Debug)]
46
pub enum Error {
57
#[error("io error: {0}")]
@@ -10,6 +12,8 @@ pub enum Error {
1012
Compact(#[from] crate::error::Error),
1113
#[error("frame not {0} found")]
1214
FrameNotFound(u64),
15+
#[error("No satisfying segment found for timestamp {0}")]
16+
SegmentNotFoundTimestamp(DateTime<Utc>),
1317
#[error("unhandled storage error: {error}, in {context}")]
1418
UnhandledStorageError {
1519
error: Box<dyn std::error::Error + Send + Sync + 'static>,

0 commit comments

Comments
 (0)