erpnext-errors-serverscripts

Implement error-handling patterns for ERPNext Server Scripts with validation and logging.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-errors-serverscripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erpnext-errors-serverscripts
Source: https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package/tree/main/skills/source/errors/erpnext-errors-serverscripts
Command: npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-errors-serverscripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ERPNext Server Scripts run in a sandbox with restricted capabilities, making conventional error handling brittle. This skill provides a comprehensive set of deterministic error-handling patterns that guide developers to produce predictable behavior, actionable feedback, and safer data operations within Server Scripts.

Core Features & Use Cases

  • Comprehensive validation, warning, and error-throwing strategies for ERPNext Server Scripts.
  • Safe database access, permission checks, and idempotent batch processing patterns to avoid partial failures.
  • Real-world use cases include document-event validation, API endpoints, and scheduled tasks with robust logging and rollback safety.

Quick Start

Identify a document event, collect all validation errors, and throw them together with a clear, user-friendly message.

Frequently Asked Questions about erpnext-errors-serverscripts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle errors in ERPNext Server Scripts without breaking the sandbox?

To handle errors in ERPNext Server Scripts, use deterministic patterns like safe database lookups, permission checks, and frappe.throw to ensure predictable behavior within sandbox constraints while delivering clear user feedback.

How do I collect multiple validation errors in an ERPNext document event script?

To collect multiple validation errors in an ERPNext document event, implement an error-collection strategy that gathers all validation failures and throws them together with a clear, user-friendly message rather than stopping at the first error.

Can I use frappe.throw for safe data access in ERPNext Server Scripts?

Yes, frappe.throw is guided for safe data access in ERPNext Server Scripts, enforcing sandbox constraints while providing robust error-handling and validation patterns for document events and API endpoints.

What's the best way to prevent partial failures in ERPNext scheduled tasks?

The best way to prevent partial failures in ERPNext scheduled tasks is using idempotent batch processing patterns combined with robust logging and rollback safety to ensure predictable behavior and safe data operations.

Why does my ERPNext Server Script fail during permission checks?

ERPNext Server Scripts fail during permission checks when conventional error handling bypasses sandbox constraints, requiring deterministic patterns with safe lookups and robust permission validation to produce predictable behavior.

Does ERPNext Server Script error handling work for API endpoints and scheduler tasks?

Yes, ERPNext Server Script error handling applies to API endpoints and scheduler tasks, covering validation, logging, permission checks, and safe data access to ensure predictable behavior across all script types.