Error handling utilities for node