data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

[Bug]: ConnectionString parsing for AppInsights - DAB CLI

Open seantleonard opened this issue 1 year ago • 2 comments

What happened?

A bug happened!

Invalid connection string results in uncaught exception.

When starting using "dab start" the error message returned when connection string is invalid is not user-friendly. See stack trace. I originally thought the error was for db connection string until i saw stack trace originated from "Microsoft.ApplicationInsights"

Version

.11rc

What database are you using?

Azure SQL

What hosting model are you using?

Local (including CLI)

Which API approach are you accessing DAB through?

REST

Relevant log output


crit: Microsoft.AspNetCore.Hosting.Diagnostics[6]
      Application startup exception
      System.ArgumentException: There was an error parsing the Connection String: Input contains invalid delimiters and cannot be parsed. Expected example: 'key1=value1;key2=value2;key3=value3'.
       ---> System.ArgumentException: Input contains invalid delimiters and cannot be parsed. Expected example: 'key1=value1;key2=value2;key3=value3'.
         at Microsoft.ApplicationInsights.Extensibility.Implementation.ConfigString.ConfigStringParser.Parse(String configString)

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

seantleonard avatar Feb 16 '24 20:02 seantleonard

@Sean, Can you please add details on what was the connection string you provided for AppInsights. Also the expected behavior.

abhishekkumams avatar Feb 19 '24 06:02 abhishekkumams