catch AttributeError if unable to store reason code (#18)