frappe-errors-database
Originally fromopenaec-foundation/frappe_claude_skill_package
Installation
SKILL.md
Frappe Database Error Diagnosis & Resolution
Cross-ref: frappe-core-database (API syntax), frappe-errors-controllers (controller errors).
Error-to-Fix Mapping Table
| Error / Exception | HTTP | Cause | Fix |
|---|---|---|---|
DuplicateEntryError |
409 | Unique constraint violation on insert/rename | Check existence first OR catch and return existing |
DoesNotExistError |
404 | get_doc() on missing record |
Use frappe.db.exists() first OR catch exception |
LinkValidationError |
417 | Link field points to non-existent record | Validate link target exists before save |
LinkExistsError |
N/A | Delete blocked by linked documents | Show linked docs to user; use force=True carefully |
MandatoryError |
417 | Required field is empty on save | Set all mandatory fields before insert/save |
TimestampMismatchError |
N/A | Concurrent edit detected (modified changed) |
Reload doc and retry, or inform user to refresh |
CharacterLengthExceededError |
417 | String exceeds field maxlength / DB column size | Truncate input or increase field length |
DataTooLongException |
417 | Value exceeds DB column storage capacity | Same as CharacterLengthExceededError |
InReadOnlyMode |
503 | Write attempted during read-only mode | Check frappe.flags.in_import or site config |
Related skills