AppFlowy/rust-lib/flowy-user/src/protobuf/proto/errors.proto
2021-08-24 13:23:19 +08:00

34 lines
866 B
Protocol Buffer

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