frappe-errors-clientscripts

Diagnose Frappe Client Script runtime errors and enforce safe event patterns.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-errors-clientscripts-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-errors-clientscripts
Source: https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/errors/frappe-errors-clientscripts
Command: npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-errors-clientscripts-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you debug Frappe Client Scripts that fail silently or crash with runtime errors, so you can prevent production-breaking issues like TypeErrors, broken async frappe.call flows, incorrect frm/cur_frm usage, and child table access bugs.

Core Features & Use Cases

  • Error diagnosis flow: Maps common console/runtime errors to likely causes and the correct mitigation steps, including timing/setup vs refresh issues and CSRF/permission failures.
  • Error message → cause → fix table: Provides targeted fixes for frequent failures such as undefined field access, async promise rejections, frm.set_value not behaving, and recursion loops.
  • Debug tools and guardrails: Recommends safe browser console/network inspection techniques and strict ALWAYS/NEVER rules tailored to Frappe v14/v15/v16 client scripting.

Quick Start

Use the skill for a failing Frappe Client Script by pasting the exact browser console error you see (and the relevant event handler code) and ask it to produce the most likely cause and the corrected pattern.

Frequently Asked Questions about frappe-errors-clientscripts

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

FAQPage Schema
Why does my frappe.call request fail silently in a client script?

Silent frappe.call failures are often caused by async/await promise rejections or CSRF/permission problems. You must handle server responses with null-safe checks and verify that your async event handler properly awaits the promise before accessing returned data.

How do I fix a TypeError when accessing fields in a Frappe client script?

TypeError crashes in Frappe client scripts usually stem from incorrect cur_frm usage or accessing undefined fields during timing events. Enforce correct event-parameter usage and validate field existence before accessing values to prevent these runtime errors.

What is the correct way to access child table rows in Frappe client events?

Access child table rows in Frappe client events by using frappe.get_doc to retrieve the child doctype and frappe.model.set_value to modify specific row fields. Avoid direct array manipulation to prevent row access mistakes and ensure deterministic form behavior.

How do I debug frappe client script recursion loops and broken frm.set_value behavior?

Debug frappe client script recursion loops by inspecting browser console errors and checking if frm.set_value triggers the same event handler repeatedly. Apply strict ALWAYS/NEVER rules for Frappe v14/v15/v16 to identify timing issues and use validate-safe throw usage.

Can I use async await with frappe.call in form events without breaking the workflow?

You can use async await with frappe.call in Frappe form events by ensuring the event handler function is declared async and all promise rejections are caught. Null-safe server response handling is required to prevent workflow errors and silent crashes.