restore message state if nonrecoverable error occurs during a retry