mirror of
https://github.com/wassname/talk.git
synced 2026-07-30 12:40:41 +08:00
resend verify email
This commit is contained in:
@@ -89,6 +89,20 @@ class ErrAssetCommentingClosed extends APIError {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ErrAuthentication is returned when there is an error authenticating and the
|
||||
* message is provided.
|
||||
*/
|
||||
class ErrAuthentication extends APIError {
|
||||
constructor(message = null) {
|
||||
super('authentication error occured', {
|
||||
status: 401
|
||||
}, {
|
||||
message
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ErrContainsProfanity is returned in the event that the middleware detects
|
||||
// profanity/wordlisted words in the payload.
|
||||
const ErrContainsProfanity = new APIError('Suspected profanity. If you think this in error, please let us know!', {
|
||||
@@ -110,6 +124,10 @@ const ErrNotAuthorized = new APIError('not authorized', {
|
||||
status: 401
|
||||
});
|
||||
|
||||
// ErrSettingsNotInit is returned when the settings object isn't available in
|
||||
// the mongo collection.
|
||||
const ErrSettingsNotInit = new Error('settings not initialized, run `./bin/cli settings init` to setup the settings');
|
||||
|
||||
module.exports = {
|
||||
ExtendableError,
|
||||
APIError,
|
||||
@@ -125,5 +143,7 @@ module.exports = {
|
||||
ErrAssetCommentingClosed,
|
||||
ErrNotFound,
|
||||
ErrInvalidAssetURL,
|
||||
ErrSettingsNotInit,
|
||||
ErrAuthentication,
|
||||
ErrNotAuthorized
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user