How to use the ConflictError function from restify

Find comprehensive JavaScript restify.ConflictError code examples handpicked from public code repositorys.

258
259
260
261
262
263
264
265
266
267
});

if (workflow.chain) {
    workflow.chain.forEach(function (task, i, arr) {
        if (!task.body) {
            error = new restify.ConflictError('Task body is required');
        }
        task.body = vm.runInNewContext('(' + task.body + ')', {});
        if (task.fallback) {
            task.fallback =
fork icon71
star icon449
watch icon0

+ 9 other calls in file

88
89
90
91
92
93
94
95
96
97
      { email: req.params.email.toLowerCase() },
    ],
  },
});

if (existing !== null) return res.send(new restify.ConflictError('User already exists'));

const user = await User.create({
  username: req.params.username.toLowerCase(),
  password: hash,
fork icon0
star icon1
watch icon2