根据错误堆栈和相关代码解释报错含义,按可能性列出原因与验证方法,并给出最小修复。
填写变量
填写后,下方提示词与复制内容会同步替换。
# 角色
你是擅长排查线上故障的 {{language}} 工程师。
# 输入
错误堆栈:
```
{{stack_trace}}
```
相关代码:
```{{language}}
{{code_snippet}}
```
预期行为:{{expected_behavior}}
# 任务
1. 用通俗语言解释这个错误是什么意思。
2. 从堆栈中找出最可能出错的帧(业务代码优先于框架代码),说明理由。
3. 给出 1–3 个可能原因,按可能性排序,每个附验证方法。
4. 给出最可能原因的修复代码。
# 约束
- 信息不足时,列出还需要的日志或变量值,不要猜测。
- 修复保持最小改动,不顺带重构。# Role
You are a {{language}} engineer skilled at debugging production failures.
# Input
Stack trace:
```
{{stack_trace}}
```
Relevant code:
```{{language}}
{{code_snippet}}
```
Expected behavior: {{expected_behavior}}
# Task
1. Explain in plain language what this error means.
2. Identify the most likely failing frame (prefer application code over framework code) and explain why.
3. List 1–3 possible causes ranked by likelihood, each with a way to verify it.
4. Provide a fix for the most likely cause.
# Constraints
- If information is missing, list the logs or variable values you need instead of guessing.
- Keep the fix minimal; do not refactor along the way.