iisnode encountered an error when processing the request.

HRESULT: 0x6d
HTTP status: 500
HTTP subStatus: 1013
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

(node:3456) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3456) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(node:3456) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
sql query execution error:

DECLARE @trg TABLE (uuid uniqueidentifier);

WITH src AS (
    SELECT [uuid], [order_id], [amount], [title], [type], [created_at], [changed_at], [sync_ver], [is_deleted] FROM [orderextra] AS src
    WHERE owner='298C7E35-FD44-4A02-8DDC-7F7DDD100CAE' AND sync_ver>0
)

SELECT (
    SELECT * FROM src
    WHERE
        sync_ver>1715188658749
        AND is_deleted = 0
        AND NOT EXISTS (SELECT uuid FROM @trg AS trg WHERE src.uuid=trg.uuid)
    FOR JSON AUTO, INCLUDE_NULL_VALUES)
AS [new_to_client]
,
(SELECT (
    SELECT uuid FROM src
    WHERE
        sync_ver>1715188658749
        AND is_deleted = 1
    FOR JSON AUTO, INCLUDE_NULL_VALUES)
) AS [deleted]
,
(SELECT IIF(OBJECT_ID('tempdb..##MissingPKs') IS NULL, NULL, (
    SELECT [column], [value] FROM ##MissingPKs
    WHERE [table]='orderextra' AND owner='298C7E35-FD44-4A02-8DDC-7F7DDD100CAE'
    FOR JSON AUTO, INCLUDE_NULL_VALUES)
)) AS [missing_pks_in_server]
,
(SELECT
    LOWER(CONVERT(VARCHAR(32),HASHBYTES('MD5', LOWER((
        SELECT uuid, changed_at, sync_ver FROM src
        WHERE is_deleted=0
        ORDER BY convert(nvarchar(36), uuid)
        FOR JSON AUTO, INCLUDE_NULL_VALUES)
    )), 2))
) AS [checksum]

{"code":"EREQUEST","originalError":{"sqlstate":"42S02","code":208,"severity":16,"serverName":"SERVER-WIN","procName":"","lineNumber":4},"name":"RequestError","number":208,"lineNumber":4,"state":"42S02","class":16,"serverName":"SERVER-WIN","procName":""}
failed to udpate any row of <Media>
failed to udpate any row of <Media>
failed to udpate any row of <Media>
failed to udpate any row of <Media>