Return error code on error with pcs resource