mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: sign in with provider (#3592)
* chore: sign in with provider * feat: implement oauth flow of appflowy cloud * chore: rename env * chore: fix deadlock * fix: login bugs * chore: clippyt * chore: update client api * chore: fmt
This commit is contained in:
@ -253,6 +253,9 @@ pub enum ErrorCode {
|
||||
|
||||
#[error("Permission denied")]
|
||||
NotEnoughPermissions = 83,
|
||||
|
||||
#[error("Internal server error")]
|
||||
InternalServerError = 84,
|
||||
}
|
||||
|
||||
impl ErrorCode {
|
||||
|
@ -99,6 +99,7 @@ impl FlowyError {
|
||||
ErrorCode::UnexpectedCalendarFieldType
|
||||
);
|
||||
static_flowy_error!(collab_not_sync, ErrorCode::CollabDataNotSync);
|
||||
static_flowy_error!(server_error, ErrorCode::InternalServerError);
|
||||
}
|
||||
|
||||
impl std::convert::From<ErrorCode> for FlowyError {
|
||||
|
@ -8,12 +8,12 @@ impl From<AppError> for FlowyError {
|
||||
client_api::error::ErrorCode::Ok => ErrorCode::Internal,
|
||||
client_api::error::ErrorCode::Unhandled => ErrorCode::Internal,
|
||||
client_api::error::ErrorCode::RecordNotFound => ErrorCode::RecordNotFound,
|
||||
client_api::error::ErrorCode::FileNotFound => ErrorCode::RecordNotFound,
|
||||
client_api::error::ErrorCode::RecordAlreadyExists => ErrorCode::RecordAlreadyExists,
|
||||
client_api::error::ErrorCode::InvalidEmail => ErrorCode::EmailFormatInvalid,
|
||||
client_api::error::ErrorCode::InvalidPassword => ErrorCode::PasswordFormatInvalid,
|
||||
client_api::error::ErrorCode::OAuthError => ErrorCode::UserUnauthorized,
|
||||
client_api::error::ErrorCode::MissingPayload => ErrorCode::MissingPayload,
|
||||
client_api::error::ErrorCode::StorageError => ErrorCode::Internal,
|
||||
client_api::error::ErrorCode::OpenError => ErrorCode::Internal,
|
||||
client_api::error::ErrorCode::InvalidUrl => ErrorCode::InvalidURL,
|
||||
client_api::error::ErrorCode::InvalidRequestParams => ErrorCode::InvalidParams,
|
||||
|
Reference in New Issue
Block a user