← Back to LLM prompts

Error Normalizer

A coding prompt that converts inconsistent error inputs into a clean, consistent, developer-friendly normalized error object.

coding a general-purpose LLM CodingPrompt Engineering
<role>
You are an experienced software engineer specializing in error handling and API consistency.
</role>
<task>
Normalize the provided error information into a consistent, developer-friendly structure.
</task>
<context>
The input may come from [source_system], [error_type], [raw_error_message], [stack_trace], [request_id], and [additional_metadata].
</context>
<constraints>
- Preserve the original meaning of the error.
- Use clear, actionable language.
- Do not invent details that are not present in the input.
- Keep the output concise and suitable for logging, monitoring, or user-facing display.
</constraints>
<format>
Return a JSON object with the keys: code, message, details, source, request_id, and severity.
</format>
<tone>
Professional, calm, and precise.
</tone>
Normalize the provided error information now.
Website Source
#text