How to get more information out of an error?

I’ve run into this issue serveral times where I just get an “internal server error” and nothing else and have to painstakingly test random stuff until I get something to work, only to have a very slight understanding of what the problem was in the first place.

Currently I’m having issues with sql.to using sqlserver as a source. I’m using the same format for the connection string as given by the wiki, with correct values plugged in from Azure dashboard as well as a super simple “Select * From [Table]” query (where [Table] is a table in our database). I have no clue if I’m not authenticated properly, if the query is off, or anything… And with this I don’t even know where to start looking for fixes.

We’re running InfluxOSS 2.0.0-beta.16-0 Which I can now see might be an issue overall, but the main point still stands: How do I get more detailed error info from Influx?

Hello @weakman54,
Welcome! Fantastic question.
We need better error messaging in with those functions.
Can you please submit an issue here:

In the meantime can you please share what you’re trying?

Also these best practices for the sql.to() function might be helpful?
Keep the following data requirements in mind when using the sql.to() function:

  • Data in the steam must have the same column names as your SQL database. Use a combination of drop(), keep(), map(), and rename() to prepare your data before using the sql.to() function.
  • Remember your SQL schema rules. All data that doesn’t conform to your SQL schema rules will be dropped. Use the map() function to conform data to our SQL schema rules.

My apologies, I mixed up my functions, I’m trying to use sql.from(). Where I’m stuck is in the very first testing stages. All I have is this query (but with details filled in from our Azure dashboard).

I’m using the “Explore” tab in “script mode” to test. Browser is Firefox, unsure if that is relevant.

import "sql"

sql.from(
    driverName: "sqlserver",
    dataSourceName: "sqlserver://user:password@localhost:1234?database=examplebdb",
    query: "SELECT * FROM Example.Table",
)

To note is that the table I’m trying to read is relatively small, 12 columns and about 200 rows, as it is just relational metadata I want to join in to my timeseries data before sending it forward to my application.

And what I get back is “an internal error has occured”

I’ve found one way to glean a bit of info: by using the console I can click the error to go to the debugger. Here I see a condition on “UNKOWN_ERROR”, which is understandable, if frustrating. But what i’m slightly confused by is a mention of “isDemoDataAvailabilityError” which seems to be triggered. I’m unsure if that is relevant, but I’ll add it in for now.

Error message from console for reference.

Error: An internal error has occurred
    R queries.ts:261
    Redux 2
        r
        dispatch
    N queries.ts:323
    r Redux
    dispatch (index):3665
    d Redux
    editorDidMount FluxMonacoEditor.tsx:69
    editorDidMount monaco.flux.hotkeys.ts:66
    invokeFunction instantiationService.js:76
    executeCommand simpleServices.js:198
    _doDispatch abstractKeybindingService.js:135
    _dispatch abstractKeybindingService.js:100
    Yn simpleServices.js:217
    ___hb honeybadger.js:466
queries.ts:306:4