Fixes for error callback handling

Jira Issue: WP-1251