Accept error callback; Make both callbacks optional