Error handling for bg errors