AppFlowy/rust-lib/flowy-user/src/protobuf/proto/errors.proto
2021-09-16 12:38:52 +08:00

24 lines
533 B
Protocol Buffer

syntax = "proto3";
message UserError {
ErrorCode code = 1;
string msg = 2;
}
enum ErrorCode {
EmailIsEmpty = 0;
EmailFormatInvalid = 1;
EmailAlreadyExists = 2;
PasswordIsEmpty = 10;
PasswordTooLong = 11;
PasswordContainsForbidCharacters = 12;
PasswordFormatInvalid = 13;
PasswordNotMatch = 14;
UserNameTooLong = 20;
UserNameContainForbiddenCharacters = 21;
UserNameIsEmpty = 22;
UserIdInvalid = 23;
UserUnauthorized = 24;
UserNotExist = 25;
InternalError = 100;
}