parseHTTPSettings
can panic with incorrectly provisioned datasources
#1149
Labels
bug
Something isn't working
What happened:
A datasource was provisioned with string values instead of booleans in the
jsonData
. Incorrect types may be correctly interpreted by the Grafana UI - if it's expecting a bool,"false"
and"true"
are interpreted as bools; if it's expecting a string, it won't display anything for an int - but the sdk panics inparseHTTPSettings
because there are unprotected type assertions that are violated.What you expected to happen:
If
jsonData
settings are the wrong type, a meaningful error should be returned. (This should probably also happen in the UI, but it needs to happen here in any case.)How to reproduce it (as minimally and precisely as possible):
jsonData
an incorrectly-typed setting, liketlsSkipVerify: "true"
orbasicAuthUser: 42
Environment:
v0.96.0
The text was updated successfully, but these errors were encountered: