cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Getting "The name 'Html.Table' does not exist in the current context" in my custom connector project

Hi!

 

I have developed a customer connector for a web service and would like to improve error handling. For that reason I am now handling the different failure HTTP statuses that could occur. I know that the service responds with a simple HTML page in case of an error. I would like to extract the title of that page and present it to the user (e.g. authentication issues).

 

The problem I have is that the parsing of the HTML response is not possible. I get the error "The name 'Html.Table' does not exist in the current context":

 

denisthemenace_0-1601446766797.png

 

 

Here is my code:

 

shared TestSession = (server) =>
let
AuthResp = Web.Contents(server,
[RelativePath="/qcbin/authentication-point/authenticate",
ManualStatusHandling = {400,401,403,404,429,500,502,503}]
),
responseCode = Value.Metadata(AuthResp)[Response.Status],
ErrorMessage = Html.Table(AuthResp, {{"Message", "title"}})
in
if responseCode = 200 then "All good" else ErrorMessage;

 

Anyone who knows why the Function Html.Table is not available in this context?

 

EDIT: I can add that there is no way to build logic around the HTTP status code. The service has some weird implementation which returns additional information in the status code field:

 

HTTP/1.1 401 Failed to authenticate user "xxx", verify your user name and password.
Date: Wed, 30 Sep 2020 07:22:22 GMT

 

The value of 'Response.Status' is empty and I guess it's because of that additional information in the status field that prevents the SDK to extract the correct status value.

 

Thanks and best regards, Denis

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!