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
// There is no good reason to send an event to Keen.IO if it's for an invalid response.
// The rule is: if the app wouldn't handle a request, the middleware shouldn't handle it either.
KeenioMiddleware.prototype.isAcceptableStatusCode = function (statusCode) {
var whitelistCodes = [401, 402, 404],
firstCharacter = String(statusCode).charAt(0);
return firstCharacter !== '5' && firstCharacter !== '4' || whitelistCodes.indexOf(statusCode) !== -1;
};
... but what if the developers wants to track api errors with keenio ? (that's was what I was looking for). I think it should be configurable as well :).
workaround
var keenio = require('express-keenio');
keenio.constructor.prototype.isAcceptableStatusCode = function(){
return true;
};
The text was updated successfully, but these errors were encountered:
... but what if the developers wants to track api errors with keenio ? (that's was what I was looking for). I think it should be configurable as well :).
workaround
The text was updated successfully, but these errors were encountered: