Raise exception when ir_attachment creation fails