/*
* This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET).
* Copyright (c) 2021 SocialVoid.NET Authors.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this source code of library.
* If not, see .
*/
namespace SocialVoid.Errors
{
///
/// All error codes received from the SocialVoid servers.
/// Since: v0.0.0
///
public enum ErrorCodes
{
//-------------------------------------------------
#region Unknown Error
///
/// This error code will be returned when the error is not
/// implimented on client-side at all.
/// Since: v0.0.0
///
UnknownError = 0,
#endregion
//-------------------------------------------------
#region Validation Errors
///
/// This error code will be returned when the given username
/// is invalid and does not meet the specification.
/// Since: v0.0.0
///
///
InvalidUsername = 8448,
///
/// This error code will be returned when the given password is
/// invalid and/or insecure and does not meet the specification.
/// Since: v0.0.0
///
InvalidPassword = 8449,
///
/// This error code will be returned when the First Name provided
/// contains invalid characters and or is too long;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidFirstName = 8450,
///
/// This error code will be returned when the Last Name provided
/// contains invalid characters and or is too long;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidLastName = 8451,
///
/// This error code will be returned when the Biography is too long or
/// contains invalid characters;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidBiography = 8452,
///
/// This error code will be returned when the given username
/// is already registered in the server and cannot be used.
/// Since: v0.0.0
///
UsernameAlreadyExists = 8453,
///
/// This error code will be returned when the client provided
/// an invalid peer identification as input.
/// Since: v0.0.0
///
InvalidPeerInput = 8454,
///
/// This error code will be returned when the post contains
/// invalid characters or is too long;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidPostText = 8455,
///
/// This error code will be returned when the client's public hash
/// is invalid and cannot be identified as a sha256.
/// Since: v0.0.0
///
InvalidClientPublicHash = 8456,
///
/// This error code will be returned when the client's private hash
/// is invalid and cannot be identified as a sha256.
/// Since: v0.0.0
///
InvalidClientPrivateHash = 8457,
///
/// This error code will be returned when the version is invalid
/// or is too long;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidVersion = 8459,
///
/// This error code will be returned when the client name contains
/// invalid characters or is too long;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidClientName = 8460,
///
/// This error code will be returned when the session identification
/// object is invalid;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidSessionIdentification = 8461,
///
/// This error code will be returned when the platform name contains
/// invalid characters or is too long;
/// please see the message for further details.
/// Since: v0.0.0
///
InvalidPlatform = 8464,
#endregion
//-------------------------------------------------
#region Authentication Errors
///
/// This error code will be returned when the given login credentials
/// are incorrect.
/// Since: v0.0.0
///
///
IncorrectLoginCredentials = 8704,
///
/// This error code will be returned when the given two-factor
/// authentication code is incorrect.
/// Since: v0.0.0
///
IncorrectTwoFactorAuthenticationCode = 8705,
///
/// This error code will be returned when the user does not support
/// this method of authentication;
/// please see the message for further details.
/// Since: v0.0.0
///
AuthenticationNotApplicable = 8706,
///
/// This error code will be returned when the requested session
/// was not found in the database on server-side.
/// Since: v0.0.0
///
SessionNotFound = 8707,
///
/// This error code will be returned when the client attempts
/// to invoke a method that requires authentication.
/// Since: v0.0.0
///
NotAuthenticated = 8708,
///
/// This error code will be returned when the user/entity uses
/// a Private Access Token to authenticate and the client
/// attempted to authenticate in another way.
/// Since: v0.0.0
///
PrivateAccessTokenRequired = 8709,
///
/// This error code will be returned when the authentication process
/// failed for some unexpected reason;
/// please see the message for further details.
/// Since: v0.0.0
///
AuthenticationFailure = 8710,
///
/// This error code will be returned when the given session
/// challenge answer is incorrect or out of sync.
/// Since: v0.0.0
///
BadSessionChallengeAnswer = 8711,
///
/// This error code will be returned when the Two-Factor
/// Authentication is required and so the client must repeat
/// the same request but provide a Two-Factor authentication
/// code as well.
/// Since: v0.0.0
///
TwoFactorAuthenticationRequired = 8712,
///
/// This error code will be returned when the client is attempting
/// to authenticate when already authenticated.
/// Since: v0.0.0
///
AlreadyAuthenticated = 8713,
///
/// This error code will be returned when trying to use a
/// session that has been expired.
/// Since: v0.0.0
///
SessionExpired = 8714,
#endregion
//-------------------------------------------------
#region Media Errors
// TODO: This part is a work in progress,
// media has yet to be implemented on the server-side.
#endregion
//-------------------------------------------------
#region Network Errors
///
/// This error code will be returned when the requested user entity
/// was not found on the server-side.
/// Since: v0.0.0
///
///
PeerNotFound = 12544,
///
/// This error code will be returned when the client requested
/// a post that isn't found (or does not exist on the server-side).
/// Since: v0.0.0
///
PostNotFound = 12545,
///
/// This error code will be returned when the client requested a post
/// that was deleted.
/// Since: v0.0.0
///
PostDeleted = 12546,
///
/// This error code will be returned when the client attempts to
/// repost a post that has already been reposted (by the same user).
/// Since: v0.0.0
///
AlreadyReposted = 12547,
///
/// This error code will be returned when there was an error while
/// trying to upload one or more files to the server.
/// Since: v0.0.0
///
FileUploadError = 12548,
#endregion
//-------------------------------------------------
#region Server Errors
///
/// This error code will be returned when there was an unexpected
/// error while trying to process your request.
/// Since: v0.0.0
///
///
InternalServerError = 16384,
#endregion
//-------------------------------------------------
}
}