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.

116 lines
3.9 KiB

  1. const CustomError = require('custom-error-instance')
  2. module.exports = {
  3. AssetDeleteForbidden: CustomError('AssetDeleteForbidden', {
  4. message: 'You are not authorized to delete this asset.',
  5. code: 2003
  6. }),
  7. AssetFolderExists: CustomError('AssetFolderExists', {
  8. message: 'An asset folder with the same name already exists.',
  9. code: 2002
  10. }),
  11. AssetGenericError: CustomError('AssetGenericError', {
  12. message: 'An unexpected error occured during asset change.',
  13. code: 2001
  14. }),
  15. AssetInvalid: CustomError('AssetInvalid', {
  16. message: 'This asset does not exist or is invalid.',
  17. code: 2004
  18. }),
  19. AssetRenameCollision: CustomError('AssetRenameCollision', {
  20. message: 'An asset with the same filename in the same folder already exists.',
  21. code: 2005
  22. }),
  23. AssetRenameForbidden: CustomError('AssetRenameForbidden', {
  24. message: 'You are not authorized to rename this asset.',
  25. code: 2006
  26. }),
  27. AssetRenameInvalid: CustomError('AssetRenameInvalid', {
  28. message: 'The new asset filename is invalid.',
  29. code: 2007
  30. }),
  31. AssetRenameInvalidExt: CustomError('AssetRenameInvalidExt', {
  32. message: 'The file extension cannot be changed on an existing asset.',
  33. code: 2008
  34. }),
  35. AssetRenameTargetForbidden: CustomError('AssetRenameTargetForbidden', {
  36. message: 'You are not authorized to rename this asset to the requested name.',
  37. code: 2009
  38. }),
  39. AuthAccountBanned: CustomError('AuthAccountBanned', {
  40. message: 'Your account has been disabled.',
  41. code: 1016
  42. }),
  43. AuthAccountNotVerified: CustomError('AuthAccountNotVerified', {
  44. message: 'You must verify your account before your can login.',
  45. code: 1017
  46. }),
  47. AuthGenericError: CustomError('AuthGenericError', {
  48. message: 'An unexpected error occured during login.',
  49. code: 1001
  50. }),
  51. AuthLoginFailed: CustomError('AuthLoginFailed', {
  52. message: 'Invalid email / username or password.',
  53. code: 1002
  54. }),
  55. AuthProviderInvalid: CustomError('AuthProviderInvalid', {
  56. message: 'Invalid authentication provider.',
  57. code: 1003
  58. }),
  59. AuthAccountAlreadyExists: CustomError('AuthAccountAlreadyExists', {
  60. message: 'An account already exists using this email address.',
  61. code: 1004
  62. }),
  63. AuthRegistrationDisabled: CustomError('AuthRegistrationDisabled', {
  64. message: 'Registration is disabled. Contact your system administrator.',
  65. code: 1011
  66. }),
  67. AuthRegistrationDomainUnauthorized: CustomError('AuthRegistrationDomainUnauthorized', {
  68. message: 'You are not authorized to register. Must use a whitelisted domain.',
  69. code: 1012
  70. }),
  71. AuthTFAFailed: CustomError('AuthTFAFailed', {
  72. message: 'Incorrect TFA Security Code.',
  73. code: 1005
  74. }),
  75. AuthTFAInvalid: CustomError('AuthTFAInvalid', {
  76. message: 'Invalid TFA Security Code or Login Token.',
  77. code: 1006
  78. }),
  79. AuthValidationTokenInvalid: CustomError('AuthValidationTokenInvalid', {
  80. message: 'Invalid validation token.',
  81. code: 1018
  82. }),
  83. BruteInstanceIsInvalid: CustomError('BruteInstanceIsInvalid', {
  84. message: 'Invalid Brute Force Instance.',
  85. code: 1007
  86. }),
  87. BruteTooManyAttempts: CustomError('BruteTooManyAttempts', {
  88. message: 'Too many attempts! Try again later.',
  89. code: 1008
  90. }),
  91. InputInvalid: CustomError('InputInvalid', {
  92. message: 'Input data is invalid.',
  93. code: 1013
  94. }),
  95. MailNotSetup: CustomError('MailNotSetup', {
  96. message: 'Mail is not setup yet.',
  97. code: 1014
  98. }),
  99. MailTemplateFailed: CustomError('MailTemplateFailed', {
  100. message: 'Mail template failed to load.',
  101. code: 1015
  102. }),
  103. LocaleInvalidNamespace: CustomError('LocaleInvalidNamespace', {
  104. message: 'Invalid locale or namespace.',
  105. code: 1009
  106. }),
  107. SearchActivationFailed: CustomError('SearchActivationFailed', {
  108. message: 'Search Engine activation failed.',
  109. code: 1019
  110. }),
  111. UserCreationFailed: CustomError('UserCreationFailed', {
  112. message: 'An unexpected error occured during user creation.',
  113. code: 1010
  114. })
  115. }