You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.6 KiB

  1. const CustomError = require('custom-error-instance')
  2. module.exports = {
  3. AuthAccountBanned: CustomError('AuthAccountBanned', {
  4. message: 'Your account has been disabled.',
  5. code: 1016
  6. }),
  7. AuthAccountNotVerified: CustomError('AuthAccountNotVerified', {
  8. message: 'You must verify your account before your can login.',
  9. code: 1017
  10. }),
  11. AuthGenericError: CustomError('AuthGenericError', {
  12. message: 'An unexpected error occured during login.',
  13. code: 1001
  14. }),
  15. AuthLoginFailed: CustomError('AuthLoginFailed', {
  16. message: 'Invalid email / username or password.',
  17. code: 1002
  18. }),
  19. AuthProviderInvalid: CustomError('AuthProviderInvalid', {
  20. message: 'Invalid authentication provider.',
  21. code: 1003
  22. }),
  23. AuthAccountAlreadyExists: CustomError('AuthAccountAlreadyExists', {
  24. message: 'An account already exists using this email address.',
  25. code: 1004
  26. }),
  27. AuthRegistrationDisabled: CustomError('AuthRegistrationDisabled', {
  28. message: 'Registration is disabled. Contact your system administrator.',
  29. code: 1011
  30. }),
  31. AuthRegistrationDomainUnauthorized: CustomError('AuthRegistrationDomainUnauthorized', {
  32. message: 'You are not authorized to register. Must use a whitelisted domain.',
  33. code: 1012
  34. }),
  35. AuthTFAFailed: CustomError('AuthTFAFailed', {
  36. message: 'Incorrect TFA Security Code.',
  37. code: 1005
  38. }),
  39. AuthTFAInvalid: CustomError('AuthTFAInvalid', {
  40. message: 'Invalid TFA Security Code or Login Token.',
  41. code: 1006
  42. }),
  43. AuthValidationTokenInvalid: CustomError('AuthValidationTokenInvalid', {
  44. message: 'Invalid validation token.',
  45. code: 1018
  46. }),
  47. BruteInstanceIsInvalid: CustomError('BruteInstanceIsInvalid', {
  48. message: 'Invalid Brute Force Instance.',
  49. code: 1007
  50. }),
  51. BruteTooManyAttempts: CustomError('BruteTooManyAttempts', {
  52. message: 'Too many attempts! Try again later.',
  53. code: 1008
  54. }),
  55. InputInvalid: CustomError('InputInvalid', {
  56. message: 'Input data is invalid.',
  57. code: 1013
  58. }),
  59. MailNotSetup: CustomError('MailNotSetup', {
  60. message: 'Mail is not setup yet.',
  61. code: 1014
  62. }),
  63. MailTemplateFailed: CustomError('MailTemplateFailed', {
  64. message: 'Mail template failed to load.',
  65. code: 1015
  66. }),
  67. LocaleInvalidNamespace: CustomError('LocaleInvalidNamespace', {
  68. message: 'Invalid locale or namespace.',
  69. code: 1009
  70. }),
  71. SearchActivationFailed: CustomError('SearchActivationFailed', {
  72. message: 'Search Engine activation failed.',
  73. code: 1019
  74. }),
  75. UserCreationFailed: CustomError('UserCreationFailed', {
  76. message: 'An unexpected error occured during user creation.',
  77. code: 1010
  78. })
  79. }