Add callback interface and expose error details