# Dealing with a half-expected error

**URL:** <https://forum.ansible.com/t/dealing-with-a-half-expected-error/29692>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [February 15, 2019, 10:38pm UTC](https://forum.ansible.com/t/dealing-with-a-half-expected-error/29692 "2019-02-15T22:38:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl\_Auer](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Post date:** [February 15, 2019, 10:38pm UTC](https://forum.ansible.com/t/dealing-with-a-half-expected-error/29692/1 "2019-02-15T22:38:18Z")

</div>

I’ve got some code that adds a rule to an AWS security group using the ec2\_group module. The problem is that if the rule I am adding already exists, Ansible throws an error.

I am a bit puzzled as to why; normally Ansible would just say “good, it’s there already, job done”, but in this case it objects. It’s always going to fail on all but the first run.

How can I field an error, inspect it, and then continue with the playbook if I so choose?

Regards, K.
