Module messages

Module messages 

Source
Expand description

Application-level error messages

These constants provide standard error messages for application-specific errors that are not part of SaTokenError.

§Examples

use sa_token_core::error::messages;
 
let err_msg = messages::INVALID_CREDENTIALS;
return Err(ApiError::Unauthorized(err_msg.to_string()));

Constants§

AUTH_ERROR
Authentication error
INVALID_CREDENTIALS
Invalid username or password
LOGIN_FAILED
Login failed
PERMISSION_REQUIRED
Permission required
ROLE_REQUIRED
Role required