function wrappers for callbacks that implement common, simple error handling scenarios