matrix_sdk/sliding_sync/
error.rs1use matrix_sdk_common::executor::JoinError;
4use thiserror::Error;
5
6#[derive(Error, Debug)]
8#[non_exhaustive]
9pub enum Error {
10 #[error("Sliding sync version is missing")]
13 VersionIsMissing,
14
15 #[error("The sliding sync response could not be handled: {0}")]
19 BadResponse(String),
20
21 #[error("The sliding sync list `{0}` is handling a response, but its request generator has not been initialized")]
25 RequestGeneratorHasNotBeenInitialized(String),
26
27 #[error("Ranges have invalid bounds: `{start}..{end}`")]
29 InvalidRange {
30 start: u32,
32 end: u32,
34 },
35
36 #[error("Unauthenticated user in sliding sync")]
38 UnauthenticatedUser,
39
40 #[error("SlidingSync's internal channel is broken")]
42 InternalChannelIsBroken,
43
44 #[error("The Sliding Sync instance's identifier must be less than 16 chars long")]
46 InvalidSlidingSyncIdentifier,
47
48 #[error("A task failed to execute to completion; task description: {task_description}, error: {error}")]
50 JoinError {
51 task_description: String,
53 error: JoinError,
55 },
56
57 #[cfg(feature = "e2e-encryption")]
59 #[error("The Olm machine is missing")]
60 NoOlmMachine,
61
62 #[cfg(feature = "e2e-encryption")]
64 #[error(transparent)]
65 CryptoStoreError(#[from] matrix_sdk_base::crypto::CryptoStoreError),
66}