diff options
author | crupest <crupest@outlook.com> | 2020-01-18 00:50:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-18 00:50:31 +0800 |
commit | 4ec507df6251bc1dae5204fdc6aaf14ddbb268f6 (patch) | |
tree | 8479cc9af91a7e7b1c0c60a0abc778244359bdbd /Timeline.ErrorCodes/ErrorCodes.cs | |
parent | 631731e5c2253116a53fdc435afca184251a34fc (diff) | |
download | timeline-4ec507df6251bc1dae5204fdc6aaf14ddbb268f6.tar.gz timeline-4ec507df6251bc1dae5204fdc6aaf14ddbb268f6.tar.bz2 timeline-4ec507df6251bc1dae5204fdc6aaf14ddbb268f6.zip |
...
Diffstat (limited to 'Timeline.ErrorCodes/ErrorCodes.cs')
-rw-r--r-- | Timeline.ErrorCodes/ErrorCodes.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Timeline.ErrorCodes/ErrorCodes.cs b/Timeline.ErrorCodes/ErrorCodes.cs new file mode 100644 index 00000000..730f42e0 --- /dev/null +++ b/Timeline.ErrorCodes/ErrorCodes.cs @@ -0,0 +1,65 @@ +namespace Timeline.Models.Http
+{
+ /// <summary>
+ /// All error code constants.
+ /// </summary>
+ /// <remarks>
+ /// Format: 1bbbccdd
+ /// </remarks>
+ public static class ErrorCodes
+ {
+ public static class Common
+ {
+ public const int InvalidModel = 1_000_0001;
+ public const int Forbid = 1_000_0002;
+
+ public static class Header
+ {
+ public const int IfNonMatch_BadFormat = 1_000_01_01;
+ public const int ContentType_Missing = 1_000_02_01;
+ public const int ContentLength_Missing = 1_000_03_01;
+ public const int ContentLength_Zero = 1_000_03_02;
+ }
+
+ public static class Content
+ {
+ public const int TooBig = 1_000_11_01;
+ public const int UnmatchedLength_Smaller = 1_000_11_02;
+ public const int UnmatchedLength_Bigger = 1_000_11_03;
+ }
+ }
+
+ public static class UserCommon
+ {
+ public const int NotExist = 1_001_0001;
+ }
+
+ public static class TokenController
+ {
+ public const int Create_BadCredential = 1_101_01_01;
+ public const int Verify_BadFormat = 1_101_02_01;
+ public const int Verify_UserNotExist = 1_101_02_02;
+ public const int Verify_OldVersion = 1_101_02_03;
+ public const int Verify_TimeExpired = 1_101_02_04;
+ }
+
+ public static class UserController
+ {
+ public const int ChangeUsername_Conflict = 1_102_01_01;
+ public const int ChangePassword_BadOldPassword = 1_102_02_01;
+ }
+
+ public static class UserAvatar
+ {
+ public const int BadFormat_CantDecode = 1_103_00_01;
+ public const int BadFormat_UnmatchedFormat = 1_103_00_02;
+ public const int BadFormat_BadSize = 1_103_00_03;
+ }
+
+ public static class TimelineController
+ {
+ public const int PostOperationDelete_NotExist = 1_104_01_01;
+ }
+ }
+}
+
|