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; }