microsoft / vscode-powerquery-sdk

Power Query Connector Development SDK for VS Code
MIT License
72 stars 12 forks source link

Error Detail Null Fields Ignored #328

Open bgribaudo opened 5 months ago

bgribaudo commented 5 months ago

Preflight Checklist

Power Query SDK

v0.4.0

Regression From

No response

Platform

Windows

Architecture

x64

OS Version

No response

VSCode version

No response

PQSdkTool Path

No response

Bug Description

Null fields in an error's details are ignored when the error is reported.

Steps to Reproduce

  1. Create a new connector project.
  2. Replace the contents of the .test.pq with the following:
    error [Detail = [a = 123, b = null, c = 456]]
  3. Evaluate the current file.

Actual Experience

Output contains the following:

"Error": {
            "Message": "Exception of type 'Microsoft.Data.Mashup.MashupValueException' was thrown.",
            "Details": {
                "Reason": "Expression.Error",
                "a": 123,
                "c": 456
            }
        }

Expected Experience

Details should also include field b.

Additional Context

No response