Api errors
genericError: This error message indicates that something unexpected went wrong while processing the request. It could be due to a variety of issues, such as a server error or a problem with the request itself.
accessDenied: This error message indicates that the request did not include a "Bearer" token in the headers, which is required for authentication.
invalidToken: This error message indicates that the "Bearer" token included in the request headers is invalid or has expired.
totalUserTokenRatioDiferentTo1: This error message indicates that the sum of all the "token ratio" values for the users in the request is not equal to 1.
requiredFieldsMissing: This error message indicates that the request is missing one or more required fields.
diferentUserEmail: This error message indicates that the email address included in the request is different from the email address of the current user.
dbDuplicateEmailError: This error message indicates that the email address included in the request is already in use by another user in the database.
emailAlreadyExists: This error message indicates that the email address included in the request is already in use by another user.
wrongEmailOrPassword: This error message indicates that the email address or password included in the request is incorrect.
notEnoughtPermission: Indicates that the user does not have sufficient privileges to carry out a specific action. It informs the user that their request cannot be fulfilled due to a lack of permission.
userNeedCompany: Indicates when an admin user tries to perform a specific action but is not associated with any company. This error message is an indication that the user cannot proceed with the action until they are associated with a company.
userNotFound: This error message is generated when the system is unable to locate a specific user in its database.
noCompanyNameProvided: This error message is generated when a company name is not provided as a required input for a specific action.companyAlreadyExistsWithThisName:This error message is generated when a user tries to create a new company with a name that already exists in the system.
companyNotFound:This error message is generated when the system is unable to locate a specific company in its database.
noUserIdOrUserAdminId: This error message is generated when a user ID or user admin ID is not provided as a required input for a specific action.
transactionNotFound: This error message is generated when the system is unable to locate a specific transaction in its database.
enum ErrorCodeEnum {
genericError = '010',
accessDenied = '011',
invalidToken = '012',
totalUserTokenRatioDiferentTo1 = '015',
requiredFieldsMissing = '020',
diferentUserEmail = '030',
dbDuplicateEmailError = '11000',
dbEmailAlreadyExists = '12000',
wrongEmailOrPassword = '040',
notEnoughtPermission = '013',
userNeedCompany = '015',
userNotFound = '016',
noCompanyNameProvided = '021',
companyAlreadyExistsWithThisName = '022',
companyNotFound = '017',
noUserIdOrUserAdminId = '018',
transactionNotFound = '019'
}enum ErrorMessagesEnum {
genericError = 'Something went wrong!',
accessDenied = 'No Bearer token provided in the headers',
invalidToken = 'Invalid token provided, maybe the token has caducated try to login again',
totalUserTokenRatioDiferentTo1 = 'Sum of all user token ratio was diferent to 1',
requiredFieldsMissing = 'Required fields missing',
diferentUserEmail = 'Sended email was diferent than the current user email',
dbDuplicateEmailError = 'Duplicate email',
emailAlreadyExists = 'Email already exists',
wrongEmailOrPassword = 'Wrong email or password',
notEnoughtPermission = "You don't have enough permission to perform this action",
userNeedCompany = 'Looks like the admin user is not associated to any company, contact us if the problem persists',
userNotFound = 'User not found',
noCompanyNameProvided = 'No company_name provided',
companyAlreadyExistsWithThisName = 'Already exists a company with the same name provided',
companyNotFound = 'Company not found',
noUserIdOrUserAdminId = 'No user id or user admin id provided',
transactionNotFound = 'Transaction not found'
}Last updated