mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 01:12:36 +08:00
18 lines
423 B
JavaScript
18 lines
423 B
JavaScript
const { TalkError } = require('errors');
|
|
|
|
// ErrToxic is sent during a `CreateComment` mutation where
|
|
// `input.checkToxicity` is set to true and the comment contains
|
|
// toxic language as determined by the perspective service.
|
|
class ErrToxic extends TalkError {
|
|
constructor() {
|
|
super('Comment is toxic', {
|
|
status: 400,
|
|
translation_key: 'COMMENT_IS_TOXIC',
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
ErrToxic,
|
|
};
|