Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Custom Connector BUG

Dear community,

 

Recently I encoutered a bug when creating a custom connector that is .. very peculiar. Please consider the following reproduction scenario.

-Create a new custom connector, and replace the logic in the contents methods with the following ( feel free to take any API you'd like it doesn't matter for the bug ) :

let
url="https://api.publicapis.org",
path="/entries",
source = Web.Contents(url,[Headers=[#"Content-type"="application/json",
RelativePath=path]]),
responseHeaders= Value.Metadata(source)[Headers]
in
responseHeaders;

- Test the connector ( first specifying the credentials as anonymous offcourse ), and observe how several header fields are displayed.

- Paste the following method before the content method ( but after the line specifying the datasource kind and publish) :

shared aap=()=>
let
aap="noot"
in
aap;

- Please test the connector again, after specifying the credentials again please observe how the headers have been reduced to just the content type. When using an external tool like Fiddler, please note that the headers actually are still there but simply not seen ( or something like that ) by the connector. This behaviour will also happen when the connector is used in PowerBI.

 

I encoutered this bug with a different API, but the behaviour is odd. And it took me quite some time to figure out what exactly triggered this. I can't think of an explanation for this, so I'm eager to hear what's going on ... 

 

kind regards,

 

Vincent Klijs

Status: Investigating
Comments
Anonymous
Not applicable

Hi @Anonymous ,

For better help.

Based on the above information, if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

 

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best Regards,
Community Support Team _ Caitlyn

 

Anonymous
Not applicable

Dear Caitlyn,

 

Thank you the reply, I genuinely didn't know about the option to raise support tickets. I have created a ticket, hopefully it can be solved ( if not for me, then for future users! )

 

kind regards,

 

Vincent

Anonymous
Not applicable

Dear all,

 

It turned out that the issue I was facing, wasn't an issue at all. The syntax for the custom connector is more limited that I knew, and thus the behaviour I observed was intented ... Please see https://github.com/microsoft/DataConnectors/issues/513 for more details on this.

 

I do think that the tutorials on this subject could be improved ...

 

kind regards,

 

Vincent