I'm following the null first error handling convention for Node JS. Callbacks are done as callback(null, response)
. After receiving the callback response, do I have to check if error is null every single time?
Example:
methodCB(function (error, response) {
if (error) {
//handle error
//Do i have to check this every single time for a callback?
//Are there design alternatives for this or is this just a node thing?
} else {
//process response
}
});