microsoft / microsoft/Power-Fx

System.NotImplementedException because of missing Check for JSON in HttpFunctionInvoker.cs:DecodeResponseAsync

Open
#2,106 2 comments 0 reactions 1 assignee View on GitHub

@LucGenetier is already working on this.

Since Dec 18, 2023.

Connectors
Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

We ran into the following exception while calling a connector. It would be better if Pfx throws a PowerFxConnectorException here.

System.NotImplementedException: Expecting a StringType but got Record
at Microsoft.PowerFx.Types.FormulaValueJSON.FromJson(JsonElement element, FormulaType formulaType, Boolean numberIsFloat)
at Microsoft.PowerFx.Types.FormulaValueJSON.RecordFromJsonObject(JsonElement element, RecordType recordType, Boolean numberIsFloat)
at Microsoft.PowerFx.Types.FormulaValueJSON.FromJson(JsonElement element, FormulaType formulaType, Boolean numberIsFloat)
at Microsoft.PowerFx.Types.FormulaValueJSON.TableFromJsonArray(JsonElement array, TableType tableType, Boolean numberIsFloat)
at Microsoft.PowerFx.Types.FormulaValueJSON.FromJson(JsonElement element, FormulaType formulaType, Boolean numberIsFloat)
at Microsoft.PowerFx.Types.FormulaValueJSON.FromJson(String jsonString, FormulaType formulaType, Boolean numberIsFloat)
at Microsoft.PowerFx.Connectors.HttpFunctionInvoker.DecodeResponseAsync(HttpResponseMessage response, Boolean throwOnError)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.