How to use the errorHandler function from mssql

Find comprehensive JavaScript mssql.errorHandler code examples handpicked from public code repositorys.

80
81
82
83
84
85
86
87
88
89
request.input('userId', mssql.UniqueIdentifier, userId);
request.query(sql, function (err, recordset) {
    if (statsD) {
        statsD.timing('flick.doGetFlickById', dbStartTime);
    }
    if (err) { mssql.errorHandler(err); err.code = 'F04021'; callback(err, undefined); return; }

    recordset.forEach(function (record) {
        for (key in record) { /// Wierd thing where userId comes out as a two row array. 
            if (key === 'userId' && Array.isArray(record[key])) {
fork icon1
star icon3
watch icon2