Erpnext Errors Serverscripts

🌐Community
by openaec-foundation · vlatest · Repository

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.

1

Run in terminal (recommended)

terminal
claude mcp add erpnext-errors-serverscripts npx -- -y @trustedskills/erpnext-errors-serverscripts
2

Or manually add to ~/.claude/settings.json

~/.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/except or raise) 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, and import 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/except blocks, raise statements, and importing the traceback module are not allowed within ERPNext sandboxes due to RestrictedPython limitations.
  • Use frappe.throw(): For errors requiring script termination and error display, use frappe.throw() instead of Python's built-in exception handling.
  • Consult Related Skills: Refer to the erpnext-syntax-serverscripts skill for syntax guidance and the erpnext-impl-serverscripts skill 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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
openaec-foundation
Installs
31

🌐 Community

Passed automated security scans.