Handle errors and sync rejections