--- title: "How do I diagnose a failed query?" slug: "how-do-i-diagnose-a-failed-query" updated: 2026-10-23T14:27:23Z published: 2026-10-23T14:27:23Z canonical: "support.lusid.com/how-do-i-diagnose-a-failed-query" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # How do I diagnose a failed query? When a query fails, the error message is often only the end of the story. `/diagnose` gathers everything the platform recorded about one run into a single report: which provider call actually failed, even deep inside a view, every execution and provider call with its timings, and the full feedback log. You can save the report as Markdown to send to FINBOURNE Support or hand to an AI assistant. ## Prerequisites - LumiCode installed and signed in. See [How do I install LumiCode?](/v1/docs/how-do-i-install-lumicode) - Access to the `Sys.Logs.*` providers, which hold the platform's records of each run. Most Luminesce users have them, and FINBOURNE users get more detail from further providers. Without them, the report says which parts it couldn't read and shows the rest. ## Method ### Step 1: Find the run Use one of the following: - **The query you just ran:** type `/diagnose last`. - **A run in your history:** type `/history`, choose a time range, and choose **Failed only** to keep just the failures. Select the run, press Enter to open it, then press `d`. - **An execution ID or request ID:** type `/diagnose <id>`. You'll find execution IDs in LumiCode's output as queries run and in `/history`. Error messages and API responses carry request IDs, for example `/diagnose 2025091514-f9626faa80ca48eba11197446fc7ad8b`. By default, `/diagnose` looks for an execution ID in the last two hours. For an older run, add a time window, for example `/diagnose <execution-id> 3d`. A request ID needs no time window. ### Step 2: Read the Cause The report opens with **Cause**. Read this first. When one provider call fails, Luminesce abandons the others running beside it, so the first error you saw may not be the real one. **Cause** names the call that failed and lists the abandoned ones separately. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-HDBLSC03.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=kJ%2B%2FGOH2QPHSHj%2F6cIJMoKdnz9y46RWnDxT57%2B6%2FE%2B8%3D) ### Step 3: Look at the detail Below the Cause, the report lists every execution in the run. Views run as executions of their own, so each one appears with its SQL, duration, row count and any error. Some options are not available for different users or in different cases. | Key | What it shows | | --- | --- | | Arrow keys, then Enter | Everything about one execution | | `o` | Overview, a good place to start after the view hierarchy | | `p` | Every provider call, with timings, row counts | | `l` | The server logs around the run. Press `/` to filter them. | | `f` | The feedback log. Feedback is kept for 31 days. | | `h` | Other runs of similar SQL, to see whether the problem is new | ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-NO4XFXBQ.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A43Z&se=2026-11-18T20%3A26%3A43Z&sr=b&sp=r&sig=d49b1Vfztl%2BmL4JGfHelXeFtRRtdZp0rlPMteMNlNoA%3D) ### Step 4: Save the report Press `s` to save the report as a Markdown file. Attach it when you contact FINBOURNE Support, or give it to an AI assistant to explain. Press `c` to copy just the highlights to the clipboard instead. ## Related articles - [How do I find and re-run a past query?](/v1/docs/how-do-i-find-and-re-run-a-past-query)