expose error callback