Implements COMETD-408 (allow more detailed error handling)