pub enum WaeErrorKind {
Show 107 variants
InvalidFormat {
field: String,
expected: String,
},
OutOfRange {
field: String,
min: Option<String>,
max: Option<String>,
},
Required {
field: String,
},
AlreadyExists {
field: String,
value: String,
},
NotAllowed {
field: String,
allowed: Vec<String>,
},
InvalidParams {
param: String,
reason: String,
},
InvalidCredentials,
AccountLocked,
UserNotFound {
identifier: String,
},
UserAlreadyExists {
username: String,
},
InvalidToken {
reason: String,
},
TokenExpired,
TokenNotValidYet,
InvalidSignature,
InvalidAlgorithm,
MissingClaim {
claim: String,
},
InvalidClaim {
claim: String,
},
InvalidIssuer {
expected: String,
actual: String,
},
InvalidAudience,
KeyError,
EncodingError,
DecodingError,
InvalidAuthorizationCode,
InvalidRedirectUri,
InvalidClientId,
InvalidClientSecret,
InvalidScope {
scope: String,
},
InvalidAccessToken,
InvalidRefreshToken,
AccessDenied {
reason: String,
},
UnsupportedGrantType {
grant_type: String,
},
UnsupportedResponseType {
response_type: String,
},
StateMismatch,
OAuth2ProviderError {
message: String,
},
InvalidSamlRequest {
reason: String,
},
InvalidSamlResponse {
reason: String,
},
InvalidAssertion {
reason: String,
},
SignatureVerificationFailed {
reason: String,
},
MissingSignature,
CertificateError {
reason: String,
},
XmlParsingError {
reason: String,
},
Base64DecodeError {
reason: String,
},
CompressionError {
reason: String,
},
AssertionExpired,
AssertionNotYetValid,
SamlAudienceValidationFailed {
expected: String,
actual: String,
},
SamlIssuerValidationFailed {
expected: String,
actual: String,
},
DestinationValidationFailed,
ReplayAttackDetected,
UnsupportedBinding {
binding: String,
},
UnsupportedNameIdFormat {
format: String,
},
InvalidSecret {
reason: String,
},
InvalidCode,
CodeExpired,
InvalidCodeFormat {
expected: usize,
actual: usize,
},
InvalidTimeStep,
Base32Error {
reason: String,
},
HmacError {
reason: String,
},
QrCodeError {
reason: String,
},
PermissionDenied {
action: String,
},
Forbidden {
resource: String,
},
ResourceNotFound {
resource_type: String,
identifier: String,
},
ResourceConflict {
resource: String,
reason: String,
},
ConnectionFailed {
target: String,
},
DnsResolutionFailed {
host: String,
},
TlsError {
reason: String,
},
ProtocolError {
protocol: String,
reason: String,
},
ServiceUnavailable {
service: String,
},
GatewayError {
gateway: String,
},
StorageReadFailed {
path: String,
},
StorageWriteFailed {
path: String,
},
StorageDeleteFailed {
path: String,
},
InsufficientCapacity {
required: u64,
available: u64,
},
DataCorruption {
location: String,
},
StorageFileNotFound {
path: String,
},
DatabaseConnectionFailed {
reason: String,
},
QueryFailed {
query: Option<String>,
reason: String,
},
ExecuteFailed {
statement: Option<String>,
reason: String,
},
TransactionFailed {
reason: String,
},
MigrationFailed {
version: Option<String>,
reason: String,
},
CacheConnectionFailed {
reason: String,
},
CacheKeyNotFound {
key: String,
},
SerializationFailed {
type_name: String,
},
DeserializationFailed {
type_name: String,
},
CircuitBreakerOpen {
service: String,
},
RateLimitExceeded {
limit: u64,
},
MaxRetriesExceeded {
attempts: u32,
},
BulkheadFull {
max_concurrent: usize,
},
BulkheadWaitTimeout,
TaskNotFound {
task_id: String,
},
TaskAlreadyExists {
task_id: String,
},
InvalidCronExpression {
expression: String,
},
TaskExecutionFailed {
task_id: String,
reason: String,
},
SchedulerShutdown,
MockError {
reason: String,
},
AssertionFailed {
message: String,
},
FixtureError {
reason: String,
},
EnvironmentError {
reason: String,
},
OperationTimeout {
operation: String,
timeout_ms: u64,
},
ConfigMissing {
key: String,
},
ConfigInvalid {
key: String,
reason: String,
},
InternalError {
reason: String,
},
NotImplemented {
feature: String,
},
IoError {
operation: String,
reason: String,
},
JsonError {
reason: String,
},
ParseError {
type_name: String,
reason: String,
},
RequestError {
url: String,
reason: String,
},
}Expand description
统一错误类型枚举
整合所有模块的错误变体,每个变体对应一个 i18n key。
Variants§
InvalidFormat
无效格式
OutOfRange
值超出范围
Required
必填字段缺失
AlreadyExists
值已存在
NotAllowed
值不允许
InvalidParams
无效参数
InvalidCredentials
无效凭证
AccountLocked
账户已锁定
UserNotFound
用户未找到
UserAlreadyExists
用户已存在
InvalidToken
无效令牌
TokenExpired
令牌已过期
TokenNotValidYet
令牌尚未生效
InvalidSignature
无效签名
InvalidAlgorithm
无效算法
MissingClaim
缺少声明
InvalidClaim
无效声明
InvalidIssuer
无效签发者
InvalidAudience
无效受众
KeyError
密钥错误
EncodingError
编码错误
DecodingError
解码错误
InvalidAuthorizationCode
无效授权码
InvalidRedirectUri
无效重定向 URI
InvalidClientId
无效客户端 ID
InvalidClientSecret
无效客户端密钥
InvalidScope
无效授权范围
InvalidAccessToken
无效访问令牌
InvalidRefreshToken
无效刷新令牌
AccessDenied
访问被拒绝
UnsupportedGrantType
不支持的授权类型
UnsupportedResponseType
不支持的响应类型
StateMismatch
状态不匹配
OAuth2ProviderError
OAuth2 提供者错误
InvalidSamlRequest
无效 SAML 请求
InvalidSamlResponse
无效 SAML 响应
InvalidAssertion
无效断言
SignatureVerificationFailed
签名验证失败
MissingSignature
缺少签名
CertificateError
证书错误
XmlParsingError
XML 解析错误
Base64DecodeError
Base64 解码错误
CompressionError
压缩错误
AssertionExpired
断言已过期
AssertionNotYetValid
断言尚未生效
SamlAudienceValidationFailed
受众验证失败
SamlIssuerValidationFailed
发行人验证失败
DestinationValidationFailed
目标验证失败
ReplayAttackDetected
重放攻击检测
UnsupportedBinding
不支持的绑定
UnsupportedNameIdFormat
不支持的名称 ID 格式
InvalidSecret
无效密钥
InvalidCode
无体验证码
CodeExpired
验证码已过期
InvalidCodeFormat
验证码格式错误
InvalidTimeStep
无效时间步长
Base32Error
Base32 错误
HmacError
HMAC 错误
QrCodeError
QR 码错误
PermissionDenied
权限拒绝
Forbidden
禁止访问
ResourceNotFound
资源未找到
ResourceConflict
资源冲突
ConnectionFailed
连接失败
DnsResolutionFailed
DNS 解析失败
TlsError
TLS 错误
ProtocolError
协议错误
服务不可用
GatewayError
网关错误
StorageReadFailed
读取失败
StorageWriteFailed
写入失败
StorageDeleteFailed
删除失败
InsufficientCapacity
容量不足
DataCorruption
数据损坏
StorageFileNotFound
文件未找到
DatabaseConnectionFailed
数据库连接失败
QueryFailed
查询失败
ExecuteFailed
执行失败
TransactionFailed
事务失败
MigrationFailed
迁移失败
CacheConnectionFailed
缓存连接失败
CacheKeyNotFound
缓存键不存在
SerializationFailed
序列化失败
DeserializationFailed
反序列化失败
CircuitBreakerOpen
熔断器开启
RateLimitExceeded
限流超出
MaxRetriesExceeded
重试次数耗尽
BulkheadFull
舱壁已满
BulkheadWaitTimeout
舱壁等待超时
TaskNotFound
任务未找到
TaskAlreadyExists
任务已存在
InvalidCronExpression
无效 Cron 表达式
TaskExecutionFailed
任务执行失败
SchedulerShutdown
调度器已关闭
MockError
Mock 错误
AssertionFailed
断言失败
FixtureError
Fixture 错误
EnvironmentError
环境错误
OperationTimeout
操作超时
ConfigMissing
配置缺失
ConfigInvalid
配置无效
InternalError
内部错误
NotImplemented
未实现
IoError
IO 错误
JsonError
JSON 错误
ParseError
解析错误
RequestError
请求错误
Implementations§
Trait Implementations§
Source§impl Clone for WaeErrorKind
impl Clone for WaeErrorKind
Source§fn clone(&self) -> WaeErrorKind
fn clone(&self) -> WaeErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WaeErrorKind
impl Debug for WaeErrorKind
Source§impl<'de> Deserialize<'de> for WaeErrorKind
impl<'de> Deserialize<'de> for WaeErrorKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WaeErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WaeErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for WaeErrorKind
impl Display for WaeErrorKind
Source§impl Serialize for WaeErrorKind
impl Serialize for WaeErrorKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for WaeErrorKind
impl RefUnwindSafe for WaeErrorKind
impl Send for WaeErrorKind
impl Sync for WaeErrorKind
impl Unpin for WaeErrorKind
impl UnsafeUnpin for WaeErrorKind
impl UnwindSafe for WaeErrorKind
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
Mutably borrows from an owned value. Read more