456
Prompt

Error Diagnoser Prompt

Turn a stack trace + code into a ranked diagnosis with next steps.

1 min readupdated 2026-07-04

/ quick answer

Wire into your monitoring pipeline for auto-triage. Turn a stack trace + code into a ranked diagnosis with next steps.

Turn a stack trace + code into a ranked diagnosis with next steps. Wire into your monitoring pipeline for auto-triage. Copy the prompt below, swap the bracketed variables for your own context, and run it in any capable model. This prompt node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
Context
Wire into your monitoring pipeline for auto-triage.
Prompt
Given the stack trace and code snippet, produce:
1. Most likely cause (1 sentence).
2. Two alternate hypotheses.
3. First 3 things to check.
4. One-line fix if obvious.

Stack:
{{stack}}
Code:
{{code}}
Example Output
Most likely: null user in the auth middleware on a public route.
Alternates: token expiry, wrong env var...
Check: request headers, middleware order, env in prod.
Fix: guard middleware behind /_authenticated.
/ frequently asked

What does the Error Diagnoser Prompt prompt do?

Wire into your monitoring pipeline for auto-triage.

Which AI models work with this prompt?

It is model-agnostic: it works with any capable general model. Replace the bracketed variables with your own context before running it.

What output should I expect?

Most likely: null user in the auth middleware on a public route. Alternates: token expiry, wrong env var... Check: request headers, middleware order, env in prod. Fix: guard middleware behind /_authenticated.

/ topics#dev#prompt