Shell script to respond to chef resource

Suppose I call a shell script via bash resource…Now this shell script returns exit 1…
If this shell script returns 1 then i need to abort chef-client run.
How is this possible?