/// <summary>
        /// Writes an <see cref="ODataError"/> as the message payload.
        /// </summary>
        /// <param name="error">The error to write.</param>
        /// <param name="includeDebugInformation">
        /// A flag indicating whether debug information (e.g., the inner error from the <paramref name="error"/>) should
        /// be included in the payload. This should only be used in debug scenarios.
        /// </param>
        private void WriteErrorImplementation(ODataError error, bool includeDebugInformation)
        {
            ODataJsonLightSerializer jsonLightSerializer = new ODataJsonLightSerializer(this, false);

            jsonLightSerializer.WriteTopLevelError(error, includeDebugInformation);
        }
 /// <summary>
 /// Writes an <see cref="ODataError"/> as the message payload.
 /// </summary>
 /// <param name="error">The error to write.</param>
 /// <param name="includeDebugInformation">
 /// A flag indicating whether debug information (e.g., the inner error from the <paramref name="error"/>) should 
 /// be included in the payload. This should only be used in debug scenarios.
 /// </param>
 private void WriteErrorImplementation(ODataError error, bool includeDebugInformation)
 {
     ODataJsonLightSerializer jsonLightSerializer = new ODataJsonLightSerializer(this, false);
     jsonLightSerializer.WriteTopLevelError(error, includeDebugInformation);
 }