AppFlowy/rust-lib/flowy-user/src/protobuf/proto/errors.proto
2021-09-01 16:08:32 +08:00

36 lines
919 B
Protocol Buffer

syntax = "proto3";
message UserError {
ErrorCode code = 1;
string msg = 2;
}
enum ErrorCode {
Unknown = 0;
UserDatabaseInitFailed = 1;
UserDatabaseWriteLocked = 2;
UserDatabaseReadLocked = 3;
UserDatabaseDidNotMatch = 4;
UserDatabaseInternalError = 5;
SqlInternalError = 6;
DatabaseConnectError = 7;
UserNotLoginYet = 10;
ReadCurrentIdFailed = 11;
WriteCurrentIdFailed = 12;
EmailIsEmpty = 20;
EmailFormatInvalid = 21;
EmailAlreadyExists = 22;
PasswordIsEmpty = 30;
PasswordTooLong = 31;
PasswordContainsForbidCharacters = 32;
PasswordFormatInvalid = 33;
PasswordNotMatch = 34;
UserNameTooLong = 40;
UserNameContainsForbiddenCharacters = 41;
UserNameIsEmpty = 42;
UserWorkspaceInvalid = 50;
UserIdInvalid = 51;
CreateDefaultWorkspaceFailed = 52;
DefaultWorkspaceAlreadyExist = 53;
ServerError = 100;
}