Files
talk/plugins/talk-plugin-akismet/server/errors.js
T
Wyatt Johnson 86385e0d86 Jest for server
- Introduced the Jest testing framework into our server side code so
plugins can now have tests that run
2018-04-11 19:02:38 -06:00

18 lines
409 B
JavaScript

const { TalkError } = require('errors');
// ErrSpam is sent during a `CreateComment` mutation where
// `input.checkSpam` is set to true and the comment contains
// detected spam as determined by the akismet service.
class ErrSpam extends TalkError {
constructor() {
super('Comment is spam', {
status: 400,
translation_key: 'COMMENT_IS_SPAM',
});
}
}
module.exports = {
ErrSpam,
};