Backport of COMETD-408 (allow more detailed error handling)