Define specific error for event stream ended

This commit is contained in:
2025-04-06 08:12:58 +01:00
parent 8ff379d040
commit d1678bdc37
2 changed files with 7 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ pub enum Error {
NoCandidatesError,
CannotCloneRequestError(CannotCloneRequestError),
EventSourceError(reqwest_eventsource::Error),
EventSourceClosedError,
}
impl Display for Error {
@@ -37,6 +38,9 @@ impl Display for Error {
Error::EventSourceError(e) => {
write!(f, "EventSourrce Error: {}", e)
}
Error::EventSourceClosedError => {
write!(f, "EventSource closed error")
}
}
}
}