Skip to content

Debugging Insight Widgets

This page helps you find out why a Custom Text, Custom Time Series or Custom Categorical widget shows an error, sample data or the wrong numbers, and why a Web Request source fails Test Connection. Each section starts with the text you see. For the contract itself, see the Web Request Source Reference.

Where to look

  1. The widget. A failed widget shows "Failed to load widget data" and, under it, the message this page lists.
  2. Your endpoint's log (Application Insights, CloudWatch). Every call from KnowledgeLake has a User-Agent that starts with KnowledgeLake-WebRequestConnector (except /validate) and carries Dashboard-Id and Widget-Id, so you can match a log line to a widget.
  3. The browser's network tab. The widget loads its data from /api/InsightReportData/RunReport?dashboardId=...&widgetId=... on your tenant. A failed call has the message in its JSON body.

Summary

Symptom Group
Widget endpoint not reached Errors on the widget
JSON does not match schema Errors on the widget
JSON could not be validated Errors on the widget
Response could not be parsed Errors on the widget
Custom Text stays on Loading Errors on the widget
No data on a Custom Categorical widget Errors on the widget
Showing mock data until save Errors on the widget
Widget is not configured Errors on the widget
No WebRequest connectors configured Errors on the widget
WebRequest connectors could not load Errors on the widget
Bearer token rejected Errors on the Web Request source
Validate did not return 200 Errors on the Web Request source
Request timed out Errors on the Web Request source
Source endpoint not reached Errors on the Web Request source
Endpoint URL not valid Errors on the Web Request source
Only two series appear Wrong or missing data
Get Available Series shows an error or an empty list Wrong or missing data
Points are missing, doubled or shifted by a day Wrong or missing data
Weekly or monthly totals look too high Wrong or missing data
Custom Text shows Markdown characters Wrong or missing data
The numbers are stale Wrong or missing data

Reproduce the call

Most problems show up when you call your endpoint the way KnowledgeLake does. Replace the values in angle brackets:

Call the endpoint like KnowledgeLake
curl -i "https://<your-host>/api/insight/<api-relative-path>" \
  -H "Authorization: Bearer <token>" \
  -H "Creator-Token: test-owner" \
  -H "Viewer-Token: test-viewer" \
  -H "Dashboard-Id: 00000000-0000-0000-0000-000000000000" \
  -H "Dashboard-Name: Debug" \
  -H "Widget-Id: 00000000-0000-0000-0000-000000000000" \
  -H "Days-To-Include: 30"

Then check the body against https://<tenant>/api/CustomInsightExample/CustomInsightSchema with any JSON Schema (draft-07) validator, or compare it with View Example JSON in the widget settings.

Errors on the widget

Widget endpoint not reached

  • Message The custom insight endpoint could not be reached.
  • Cause KnowledgeLake got no usable answer. This one message covers all five cases below.
  • Status Your endpoint returned a status outside 2xx: 401 (token mismatch, often after a rotation), 404 (wrong API Relative Path or route), 400 (your own parameter check), or 500 (your code threw).
  • Timeout No answer within the source's Timeout (seconds).
  • Connection The host did not resolve, the TLS handshake failed, or the connection was refused.
  • Private address The host resolves to a local or private address. KnowledgeLake checks on every request, so a DNS change after the source was saved also triggers this.
  • Relative path The API Relative Path is an absolute URL (https://... or //host/...).
  • Fix Look for the request in your endpoint's log.
  • No log line The request never arrived. Check DNS, TLS, the host's public address and the relative path.
  • Status logged Your endpoint answered. Fix that status.
  • Slow log line The Timeout passed. Make the query faster, cache it, or raise Timeout (seconds) on the source.
  • See Security in the reference for the refused address ranges.

JSON does not match schema

  • Message Custom insight json does not match schema: ...
  • Cause The body is JSON but breaks the Custom Insight schema. The message names the location and the rule, and lists at most two errors. Common cases follow.
  • Version version is a number (1.0) instead of a string ("1.0").
  • Missing parts type or data is missing, or data.values is not an array.
  • Custom Text An item has no str.
  • Time Series A series value is a string or null. Every key except date must be a number.
  • Categorical A datapoint has a null title or a non-numeric amount.
  • Fix Correct the shape your endpoint builds. Fix the first error, then call again: the list shows only two at a time.
  • See The JSON shapes are in the response contract.

JSON could not be validated

  • Message Failed to validate json from custom insight endpoint.
  • Cause The body is not JSON at all: an empty body with status 200, an HTML page from a proxy or a sign-in page, or plain text.
  • Fix Call the endpoint with the curl command above and read the raw body.
  • Sign-in page If you see an HTML sign-in page, an authentication layer in front of your function (for example App Service Authentication) answered instead of your code. Let the bearer token through to your function.

Response could not be parsed

  • Message The custom insight endpoint returned a response that could not be parsed.
  • Cause The JSON passed the schema but KnowledgeLake could not read a value. The usual case is a date that is not a valid date-time.
  • Fix Send ISO 8601 UTC dates such as 2026-10-07T00:00:00Z.

Custom Text stays on Loading

  • Symptom Custom Text stays on Loading….
  • Cause The endpoint answered with an empty data.values array. Custom Text shows the newest item, and with no item it keeps its loading text.
  • Fix Always return at least one item. When there is nothing to report, return a sentence such as "No open exceptions."

No data on a Custom Categorical widget

  • Message No data available on a Custom Categorical widget
  • Cause data.values is empty, or the dataset with the newest date has no datapoints.
  • Fix Return one dataset dated now with at least one datapoint. Check which dataset has the latest date if you send more than one.

Showing mock data until save

  • Message "Showing Mock Data Until Save"
  • Cause The widget is new or its settings changed since the last save. KnowledgeLake reads the saved widget settings, so it has not called your endpoint yet.
  • Fix Click Save on the dashboard ribbon.

Widget is not configured

  • Message "Not configured" with a prompt to select a WebRequest connector
  • Cause The widget has no WebRequest Connector.
  • Fix Open Edit Widget, choose the source in Custom Insight Settings, and save the dashboard.

No WebRequest connectors configured

  • Message No WebRequest connectors are configured. Add one in the Connections app.
  • Cause The tenant has no Web Request source.
  • Fix An administrator with Connections Edit Configuration adds one in Connections > Sources > Add a Source.
  • See Introduction

WebRequest connectors could not load

  • Message Could not load WebRequest connectors. Try again.
  • Cause The list of sources failed to load. The call needs the Insight feature View Dashboards.
  • Fix Check that the author has View Dashboards and Create Dashboards, then reload the page.

Errors on the Web Request source

These appear on the source page after Test Connection or SAVE. The source does not save until Test Connection passes.

Bearer token rejected

  • Message The endpoint rejected the bearer token (401/403). Check the token and try again.
  • Cause GET {Endpoint URL}/validate returned 401 or 403. The token on the source and the token your endpoint expects differ, or a firewall or gateway in front of the endpoint refused the call.
  • Fix Paste the token again in both places. Watch for a trailing space or line break. Check that your /validate route reads the Authorization header, not a function key.

Validate did not return 200

  • Message The endpoint did not return a 200 OK response.
  • Cause /validate returned a status other than 200 and other than 401 or 403. Usual cases: 404 because the route is missing or sits at a different path, 204 from a handler that returns "no content", or 500.
  • Fix Serve GET {Endpoint URL}/validate and return exactly 200.
  • Example If the Endpoint URL is https://host/api/insight, the test calls https://host/api/insight/validate.

Request timed out

  • Message The request to the endpoint timed out.
  • Cause Either no answer arrived within Timeout (seconds), or KnowledgeLake refused the host before it sent anything: the host does not resolve in DNS, or it resolves to a local or private address. KnowledgeLake reports a timeout for refused hosts on purpose.
  • Fails at once The host is refused. Check the spelling, check that the DNS record exists, and use a publicly reachable host. KnowledgeLake cannot reach localhost, a developer machine, or an address inside your network.
  • Fails after Timeout Wake the endpoint (a cold start can be slow) and test again, or raise the Timeout.

Source endpoint not reached

  • Message The endpoint could not be reached.
  • Cause The host resolved, but the request failed: the TLS certificate was not trusted, or the connection was refused or reset.
  • Fix Open https://<your-host>/ from a machine outside your network. Fix the certificate, or open the port to the internet.

Endpoint URL not valid

  • Message Enter a valid HTTP or HTTPS URL.
  • Cause The Endpoint URL is not an absolute URL that starts with http:// or https://.
  • Fix Enter the full URL, for example https://your-function-app.azurewebsites.net/api/insight.

Wrong or missing data

Only two series appear

  • Symptom Only two series appear on a Custom Time Series widget.
  • Cause Get Available Series selects the first two series names.
  • Fix Add the others in Visible Series, or clear the selection to show all series.
  • See Daily Invoice Volume

Get Available Series shows an error or an empty list

  • Cause The probe request failed (the button shows the same messages as the widget), or the response had no data.series.
  • Probe The probe sends Series-Query: true, Days-To-Include: 7, and all-zero Dashboard-Id and Widget-Id.
  • Fix Return data.series as an array of names in a schema-valid customtimeseries payload. Do not reject the probe because the dashboard id is empty.

Points are missing, doubled or shifted by a day

  • Cause The widget matches each row to a day by the UTC date of its date, keeps only days inside the Time Range, and keeps the last row when two share a day. Rows dated in local time, or several rows per day, land on the wrong day or overwrite each other.
  • Time zones For viewers in time zones ahead of UTC, the chart's last day is the previous UTC day, so a row dated today (UTC) shows only the next day.
  • Fix Group by UTC day in your query and send one row per day dated T00:00:00Z.

Weekly or monthly totals look too high

  • Cause Weekly, Monthly and Cumulative views add the daily values. Rates, averages and running totals do not add up.
  • Fix Send per-day counts or amounts.

Custom Text shows Markdown characters

  • Symptom Custom Text shows ## and ** characters.
  • Cause Render Mode is Plain Text.
  • Fix Set Render Mode to Markdown. Raw HTML stays unrendered in both modes.

The numbers are stale

  • Cause The viewer's browser reuses the last result for browserCacheTTL seconds. There is no refresh interval: the widget loads when the dashboard opens.
  • Fix Lower browserCacheTTL (0 turns the browser cache off), then reload the dashboard after the cache expires.