#[non_exhaustive]pub enum Error {
Show 136 variants
Unreachable,
Deprecated(String),
Thrown(String),
Ds(String),
Tx(String),
TxFailure,
TxFinished,
TxReadonly,
TxConditionNotMet,
TxKeyAlreadyExists,
TxKeyTooLarge,
TxValueTooLarge,
TxTooLarge,
NsEmpty,
DbEmpty,
QueryEmpty,
QueryRemaining,
InvalidQuery(RenderedError),
InvalidContent {
value: Value,
},
InvalidMerge {
value: Value,
},
InvalidPatch {
message: String,
},
PatchTest {
expected: String,
got: String,
},
HttpDisabled,
InvalidParam {
name: String,
},
InvalidField {
line: usize,
field: String,
},
InvalidSplit {
line: usize,
field: String,
},
InvalidOrder {
line: usize,
field: String,
},
InvalidGroup {
line: usize,
field: String,
},
InvalidLimit {
value: String,
},
InvalidStart {
value: String,
},
InvalidScript {
message: String,
},
InvalidFunction {
name: String,
message: String,
},
InvalidArguments {
name: String,
message: String,
},
InvalidUrl(String),
InvalidVectorDimension {
current: usize,
expected: usize,
},
InvalidVectorDistance {
left: Arc<Vector>,
right: Arc<Vector>,
dist: f64,
},
InvalidVectorType {
current: String,
expected: &'static str,
},
InvalidVectorValue {
current: String,
},
InvalidRegex(String),
QueryTimedout,
QueryCancelled,
QueryNotExecuted,
QueryNotExecutedDetail {
message: String,
},
NsNotAllowed {
ns: String,
},
DbNotAllowed {
db: String,
},
NsNotFound {
value: String,
},
NtNotFound {
value: String,
},
NlNotFound {
value: String,
},
DbNotFound {
value: String,
},
DtNotFound {
value: String,
},
DlNotFound {
value: String,
},
FcNotFound {
value: String,
},
ScNotFound {
value: String,
},
ClAlreadyExists {
value: String,
},
NdNotFound {
value: String,
},
StNotFound {
value: String,
},
PaNotFound {
value: String,
},
TbNotFound {
value: String,
},
LvNotFound {
value: String,
},
LqNotFound {
value: String,
},
AzNotFound {
value: String,
},
IxNotFound {
value: String,
},
UnsupportedDistance(Distance),
UserRootNotFound {
value: String,
},
UserNsNotFound {
value: String,
ns: String,
},
UserDbNotFound {
value: String,
ns: String,
db: String,
},
RealtimeDisabled,
ComputationDepthExceeded,
InvalidStatementTarget {
value: String,
},
CreateStatement {
value: String,
},
UpdateStatement {
value: String,
},
RelateStatement {
value: String,
},
DeleteStatement {
value: String,
},
InsertStatement {
value: String,
},
LiveStatement {
value: String,
},
KillStatement {
value: String,
},
SingleOnlyOutput,
TablePermissions {
table: String,
},
ParamPermissions {
name: String,
},
FunctionPermissions {
name: String,
},
TableIsView {
table: String,
},
RecordExists {
thing: String,
},
IndexExists {
thing: Thing,
index: String,
value: String,
},
FieldCheck {
thing: String,
value: String,
field: Idiom,
check: String,
},
FieldValue {
thing: String,
value: String,
field: Idiom,
check: String,
},
IdMismatch {
value: String,
},
IdInvalid {
value: String,
},
CoerceTo {
from: Value,
into: String,
},
ConvertTo {
from: Value,
into: String,
},
LengthInvalid {
kind: String,
size: usize,
},
TryAdd(String, String),
TrySub(String, String),
TryMul(String, String),
TryDiv(String, String),
TryRem(String, String),
TryPow(String, String),
TryNeg(String),
TryFrom(String, &'static str),
Http(String),
Channel(String),
Io(Error),
Encode(Error),
Decode(Error),
Revision(Error),
CorruptedIndex,
NoIndexFoundForMatch {
value: String,
},
AnalyzerError(String),
HighlightError(String),
Bincode(Error),
FstError(Error),
Utf8Error(FromUtf8Error),
FeatureNotYetImplemented {
feature: String,
},
DuplicatedMatchRef {
mr: u8,
},
TimestampOverflow(String),
Internal(String),
Unimplemented(String),
CorruptedVersionstampInKey(Error),
InvalidLevel(String),
IamError(Error),
ScriptingNotAllowed,
FunctionNotAllowed(String),
NetTargetNotAllowed(String),
TokenMakingFailed,
NoRecordFound,
SignupQueryFailed,
SigninQueryFailed,
ScopeNoSignup,
ScopeNoSignin,
NoScopeFound,
MissingUserOrPass,
NoSigninTarget,
InvalidPass,
InvalidAuth,
InvalidSignup,
UnknownAuth,
TxKeyAlreadyExistsCategory(KeyCategory),
}
Expand description
An error originating from an embedded SurrealDB database.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unreachable
The database encountered unreachable logic
Deprecated(String)
Statement has been deprecated
Thrown(String)
A custom error has been thrown
Ds(String)
There was a problem with the underlying datastore
Tx(String)
There was a problem with a datastore transaction
TxFailure
There was an error when starting a new datastore transaction
TxFinished
The transaction was already cancelled or committed
TxReadonly
The current transaction was created as read-only
TxConditionNotMet
The conditional value in the request was not equal
TxKeyAlreadyExists
The key being inserted in the transaction already exists
TxKeyTooLarge
The key exceeds a limit set by the KV store
TxValueTooLarge
The value exceeds a limit set by the KV store
TxTooLarge
The transaction writes too much data for the KV store
NsEmpty
No namespace has been selected
DbEmpty
No database has been selected
QueryEmpty
No SQL query has been specified
QueryRemaining
There was an error with the SQL query
InvalidQuery(RenderedError)
There was an error with the SQL query
InvalidContent
There was an error with the SQL query
InvalidMerge
There was an error with the SQL query
InvalidPatch
There was an error with the provided JSON Patch
PatchTest
Given test operation failed for JSON Patch
HttpDisabled
Remote HTTP request functions are not enabled
InvalidParam
it is not possible to set a variable with the specified name
InvalidField
InvalidSplit
InvalidOrder
InvalidGroup
InvalidLimit
The LIMIT clause must evaluate to a positive integer
InvalidStart
The START clause must evaluate to a positive integer
InvalidScript
There was an error with the provided JavaScript code
InvalidFunction
There was a problem running the specified function
InvalidArguments
The wrong quantity or magnitude of arguments was given for the specified function
InvalidUrl(String)
The URL is invalid
InvalidVectorDimension
The size of the vector is incorrect
InvalidVectorDistance
The size of the vector is incorrect
InvalidVectorType
The size of the vector is incorrect
InvalidVectorValue
The size of the vector is incorrect
InvalidRegex(String)
Invalid regular expression
QueryTimedout
The query timedout
QueryCancelled
The query did not execute, because the transaction was cancelled
QueryNotExecuted
The query did not execute, because the transaction has failed
QueryNotExecutedDetail
The query did not execute, because the transaction has failed (with a message)
NsNotAllowed
The permissions do not allow for changing to the specified namespace
DbNotAllowed
The permissions do not allow for changing to the specified database
NsNotFound
The requested namespace does not exist
NtNotFound
The requested namespace token does not exist
NlNotFound
The requested namespace login does not exist
DbNotFound
The requested database does not exist
DtNotFound
The requested database token does not exist
DlNotFound
The requested database login does not exist
FcNotFound
The requested function does not exist
ScNotFound
The requested scope does not exist
ClAlreadyExists
NdNotFound
StNotFound
The requested scope token does not exist
PaNotFound
The requested param does not exist
TbNotFound
The requested table does not exist
LvNotFound
The requested live query does not exist
LqNotFound
The requested cluster live query does not exist
AzNotFound
The requested analyzer does not exist
IxNotFound
The requested analyzer does not exist
UnsupportedDistance(Distance)
UserRootNotFound
The requested root user does not exist
UserNsNotFound
The requested namespace user does not exist
UserDbNotFound
The requested database user does not exist
RealtimeDisabled
Unable to perform the realtime query
ComputationDepthExceeded
Reached excessive computation depth due to functions, subqueries, or futures
InvalidStatementTarget
Can not execute statement using the specified value
CreateStatement
Can not execute CREATE statement using the specified value
UpdateStatement
Can not execute UPDATE statement using the specified value
RelateStatement
Can not execute RELATE statement using the specified value
DeleteStatement
Can not execute DELETE statement using the specified value
InsertStatement
Can not execute INSERT statement using the specified value
LiveStatement
Can not execute LIVE statement using the specified value
KillStatement
Can not execute KILL statement using the specified id
SingleOnlyOutput
Can not execute CREATE statement using the specified value
TablePermissions
The permissions do not allow this query to be run on this table
ParamPermissions
The permissions do not allow this query to be run on this table
FunctionPermissions
The permissions do not allow this query to be run on this table
TableIsView
The specified table can not be written as it is setup as a foreign table view
RecordExists
A database entry for the specified record already exists
IndexExists
A database index entry for the specified record already exists
FieldCheck
The specified field did not conform to the field type check
FieldValue
The specified field did not conform to the field ASSERT clause
IdMismatch
Found a record id for the record but we are creating a specific record
IdInvalid
Found a record id for the record but this is not a valid id
CoerceTo
Unable to coerce to a value to another value
ConvertTo
Unable to convert a value to another value
LengthInvalid
Unable to coerce to a value to another value
TryAdd(String, String)
Cannot perform addition
TrySub(String, String)
Cannot perform subtraction
TryMul(String, String)
Cannot perform multiplication
TryDiv(String, String)
Cannot perform division
TryRem(String, String)
Cannot perform remainder
TryPow(String, String)
Cannot perform power
TryNeg(String)
Cannot perform negation
TryFrom(String, &'static str)
It’s is not possible to convert between the two types
Http(String)
There was an error processing a remote HTTP request
Channel(String)
There was an error processing a value in parallel
Io(Error)
Represents an underlying error with IO encoding / decoding
Encode(Error)
Represents an error when encoding a key-value entry
Decode(Error)
Represents an error when decoding a key-value entry
Revision(Error)
Represents an underlying error with versioned data encoding / decoding
CorruptedIndex
The index has been found to be inconsistent
NoIndexFoundForMatch
The query planner did not find an index able to support the match @@ or knn <> operator for a given expression
AnalyzerError(String)
Represents an error when analyzing a value
HighlightError(String)
Represents an error when trying to highlight a value
Bincode(Error)
Represents an underlying error with Bincode serializing / deserializing
FstError(Error)
Represents an underlying error with FST
Utf8Error(FromUtf8Error)
Represents an underlying error while reading UTF8 characters
FeatureNotYetImplemented
The feature has not yet being implemented
DuplicatedMatchRef
Duplicated match references are not allowed
TimestampOverflow(String)
Represents a failure in timestamp arithmetic related to database internals
Internal(String)
Internal server error This should be used extremely sporadically, since we lose the type of error as a consequence There will be times when it is useful, such as with unusual type conversion errors
Unimplemented(String)
Unimplemented functionality
CorruptedVersionstampInKey(Error)
InvalidLevel(String)
Invalid level
IamError(Error)
Represents an underlying IAM error
ScriptingNotAllowed
Scripting is not allowed
FunctionNotAllowed(String)
Function is not allowed
NetTargetNotAllowed(String)
Network target is not allowed
TokenMakingFailed
NoRecordFound
SignupQueryFailed
SigninQueryFailed
ScopeNoSignup
ScopeNoSignin
NoScopeFound
MissingUserOrPass
NoSigninTarget
InvalidPass
InvalidAuth
There was an error with authentication
InvalidSignup
There was an error with signing up
UnknownAuth
Auth was expected to be set but was unknown
TxKeyAlreadyExistsCategory(KeyCategory)
The key being inserted in the transaction already exists
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Box<ErrorKind>> for Error
impl From<Box<ErrorKind>> for Error
Source§fn from(source: BincodeError) -> Self
fn from(source: BincodeError) -> Self
Source§impl From<CaughtError<'_>> for Error
impl From<CaughtError<'_>> for Error
Source§fn from(e: CaughtError<'_>) -> Error
fn from(e: CaughtError<'_>) -> Error
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(_: Base64Error) -> Error
fn from(_: Base64Error) -> Error
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: RevisionError) -> Self
fn from(source: RevisionError) -> Self
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more