is my work getting committed successfully even with the error?
Yes. You have troubles with post-commit hook, which fired after adding transaction as new revision into repository
If my work is being committed, what is the problem?
Problem is post-commit hook, which exit with code 1 == Error (for some reason) instead of 0 == OK
I would like to know what the resolution is, if there is one.
Find used hook, read source, define why exit 1
was used for (some?) commits. Maybe disable hook at all