Erpnext Errors Serverscripts
This skill identifies and diagnoses ERPNext server script errors, streamlining troubleshooting and preventing downtime for smoother operations.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add erpnext-errors-serverscripts npx -- -y @trustedskills/erpnext-errors-serverscripts
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"erpnext-errors-serverscripts": {
"command": "npx",
"args": [
"-y",
"@trustedskills/erpnext-errors-serverscripts"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides guidance on handling errors within ERPNext server scripts. It focuses specifically on error handling patterns, acknowledging limitations imposed by the RestrictedPython environment used in ERPNext sandboxes. The skill emphasizes using appropriate methods like frappe.throw(), frappe.log_error(), and conditional checks to manage errors effectively while adhering to sandbox restrictions. This helps ensure smoother operations and prevents downtime related to server script issues.
When to use it
- When developing or debugging ERPNext server scripts where error handling is required.
- To understand how to appropriately respond to validation errors that should prevent a save or submission.
- When needing to log errors for later review and troubleshooting using
frappe.log_error(). - If you are encountering issues with standard Python error handling constructs (like
try/exceptorraise) within ERPNext server scripts.
Key capabilities
- Provides guidance on error handling patterns in ERPNext Server Scripts.
- Details limitations of the RestrictedPython environment, specifically prohibiting
try/except,raise, andimport traceback. - Explains how to use
frappe.throw()for stopping execution and displaying errors. - Covers using
frappe.log_error()for logging errors to the Error Log doctype. - Describes using
frappe.msgprint()to display messages while continuing script execution.
Example prompts
- "How should I handle a validation error in an ERPNext server script?"
- "What's the correct way to log an error within an ERPNext server script?"
- "I need to stop the execution of my ERPNext server script and show an error message. What do I use?"
Tips & gotchas
- Sandbox Restrictions: Be aware that
try/exceptblocks,raisestatements, and importing thetracebackmodule are not allowed within ERPNext sandboxes due to RestrictedPython limitations. - Use
frappe.throw(): For errors requiring script termination and error display, usefrappe.throw()instead of Python's built-in exception handling. - Consult Related Skills: Refer to the
erpnext-syntax-serverscriptsskill for syntax guidance and theerpnext-impl-serverscriptsskill for implementation workflows.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.