Improve flush exception status code