The exclusive script returns an error when the resource is running in the local node. If the resource is actually running in the node, there is no exclusive action script bug.
If the resource group does not become online on the primary node, it can be because of a start script error on the primary node or a monitor script error on the primary node. The nature of the failure can be seen in the srmd logs of the primary node.
If the action script failure status is timeout, resource type timeouts for the action should be increased. In the case of the monitor script, the check can be made more lightweight.
The resource type action script timeouts are for a resource. So, if an action is performed on two resources, the script timeout is twice the configured resource type action timeout.
If the resource group has a configuration error, check the srmd logs on the primary node for errors.
The action scripts that use ${HA_LOG} and ${HA_DBGLOG} macros to log messages can find the messages in /var/log/failsafe/script_nodename file in each node in the cluster.