You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message validator has the issue of calling the provided callback twice. It can cause error where it is assumed that function will be called once. For example:
var v = new MessageValidator('someurl');
function middleware(req, res, next) {
v.validate(validMessage, function(err, message) {
console.count('called');
if (err) {
return next(new Error('Validation error:' + err.message ));
}
// some code
throw new Error('inside callback');
});
}
The text was updated successfully, but these errors were encountered:
Message validator has the issue of calling the provided callback twice. It can cause error where it is assumed that function will be called once. For example:
The text was updated successfully, but these errors were encountered: