bugfix - move status_detail update out of the except block