# Raising errors in inventory scripts

**URL:** <https://forum.ansible.com/t/raising-errors-in-inventory-scripts/16550>\
**Category:** Ansible Developer\
**Created:** [October 18, 2014, 6:32pm UTC](https://forum.ansible.com/t/raising-errors-in-inventory-scripts/16550 "2014-10-18T18:32:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Karasek](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tomas\_Karasek](https://forum.ansible.com/u/Tomas_Karasek)\
**Post date:** [October 18, 2014, 6:32pm UTC](https://forum.ansible.com/t/raising-errors-in-inventory-scripts/16550/1 "2014-10-18T18:32:28Z")

</div>

Hello,  
is there a proper way to report errors in dynamic inventory script? Somehow so that Ansible shows the error message to the user, rather than trying to parse it as JSON.

I didn’t take a very deep look. I just saw that the ec2 script prints to stdout and exits with “1” exit status. Is that how it should be?

Thanks,  
Tomas
