set response status if error captured in dev mode