2018-12-17 05:51:52 +00:00
|
|
|
const CustomError = require('custom-error-instance')
|
2018-01-10 01:41:53 +00:00
|
|
|
|
|
|
|
module.exports = {
|
2019-05-21 20:45:27 +00:00
|
|
|
AssetFolderExists: CustomError('AssetFolderExists', {
|
|
|
|
message: 'An asset folder with the same name already exists.',
|
|
|
|
code: 2001
|
|
|
|
}),
|
2018-12-22 21:18:16 +00:00
|
|
|
AuthAccountBanned: CustomError('AuthAccountBanned', {
|
|
|
|
message: 'Your account has been disabled.',
|
|
|
|
code: 1016
|
|
|
|
}),
|
|
|
|
AuthAccountNotVerified: CustomError('AuthAccountNotVerified', {
|
|
|
|
message: 'You must verify your account before your can login.',
|
|
|
|
code: 1017
|
|
|
|
}),
|
2018-12-17 05:51:52 +00:00
|
|
|
AuthGenericError: CustomError('AuthGenericError', {
|
|
|
|
message: 'An unexpected error occured during login.',
|
|
|
|
code: 1001
|
|
|
|
}),
|
|
|
|
AuthLoginFailed: CustomError('AuthLoginFailed', {
|
|
|
|
message: 'Invalid email / username or password.',
|
|
|
|
code: 1002
|
|
|
|
}),
|
|
|
|
AuthProviderInvalid: CustomError('AuthProviderInvalid', {
|
|
|
|
message: 'Invalid authentication provider.',
|
|
|
|
code: 1003
|
|
|
|
}),
|
|
|
|
AuthAccountAlreadyExists: CustomError('AuthAccountAlreadyExists', {
|
|
|
|
message: 'An account already exists using this email address.',
|
|
|
|
code: 1004
|
|
|
|
}),
|
2018-12-21 04:02:17 +00:00
|
|
|
AuthRegistrationDisabled: CustomError('AuthRegistrationDisabled', {
|
|
|
|
message: 'Registration is disabled. Contact your system administrator.',
|
|
|
|
code: 1011
|
|
|
|
}),
|
|
|
|
AuthRegistrationDomainUnauthorized: CustomError('AuthRegistrationDomainUnauthorized', {
|
|
|
|
message: 'You are not authorized to register. Must use a whitelisted domain.',
|
|
|
|
code: 1012
|
|
|
|
}),
|
2018-12-17 05:51:52 +00:00
|
|
|
AuthTFAFailed: CustomError('AuthTFAFailed', {
|
|
|
|
message: 'Incorrect TFA Security Code.',
|
|
|
|
code: 1005
|
|
|
|
}),
|
|
|
|
AuthTFAInvalid: CustomError('AuthTFAInvalid', {
|
|
|
|
message: 'Invalid TFA Security Code or Login Token.',
|
|
|
|
code: 1006
|
|
|
|
}),
|
2018-12-24 06:03:10 +00:00
|
|
|
AuthValidationTokenInvalid: CustomError('AuthValidationTokenInvalid', {
|
|
|
|
message: 'Invalid validation token.',
|
|
|
|
code: 1018
|
|
|
|
}),
|
2018-12-17 05:51:52 +00:00
|
|
|
BruteInstanceIsInvalid: CustomError('BruteInstanceIsInvalid', {
|
|
|
|
message: 'Invalid Brute Force Instance.',
|
|
|
|
code: 1007
|
|
|
|
}),
|
|
|
|
BruteTooManyAttempts: CustomError('BruteTooManyAttempts', {
|
|
|
|
message: 'Too many attempts! Try again later.',
|
|
|
|
code: 1008
|
|
|
|
}),
|
2018-12-21 04:02:17 +00:00
|
|
|
InputInvalid: CustomError('InputInvalid', {
|
|
|
|
message: 'Input data is invalid.',
|
|
|
|
code: 1013
|
|
|
|
}),
|
2018-12-22 21:18:16 +00:00
|
|
|
MailNotSetup: CustomError('MailNotSetup', {
|
|
|
|
message: 'Mail is not setup yet.',
|
|
|
|
code: 1014
|
|
|
|
}),
|
|
|
|
MailTemplateFailed: CustomError('MailTemplateFailed', {
|
|
|
|
message: 'Mail template failed to load.',
|
|
|
|
code: 1015
|
|
|
|
}),
|
2018-12-17 05:51:52 +00:00
|
|
|
LocaleInvalidNamespace: CustomError('LocaleInvalidNamespace', {
|
|
|
|
message: 'Invalid locale or namespace.',
|
|
|
|
code: 1009
|
|
|
|
}),
|
2019-03-11 04:47:27 +00:00
|
|
|
SearchActivationFailed: CustomError('SearchActivationFailed', {
|
|
|
|
message: 'Search Engine activation failed.',
|
|
|
|
code: 1019
|
|
|
|
}),
|
2018-12-17 05:51:52 +00:00
|
|
|
UserCreationFailed: CustomError('UserCreationFailed', {
|
|
|
|
message: 'An unexpected error occured during user creation.',
|
|
|
|
code: 1010
|
|
|
|
})
|
2018-01-10 01:41:53 +00:00
|
|
|
}
|