Skip to Content
Error Codes

Error Codes

All errors are returned as JSON on stderr with a consistent structure:

{ "ok": false, "error": { "code": "ERROR_CODE", "message": "Human-readable description", "details": { ... } } }

Error Code Reference

CodeDescription
PROJECT_NOT_FOUNDNo .mdp/ directory found
ISSUE_NOT_FOUNDIssue ID does not exist
MILESTONE_NOT_FOUNDMilestone ID does not exist
TEMPLATE_NOT_FOUNDTemplate file not found
INVALID_STATUSStatus name not in config
INVALID_PRIORITYPriority name not in config
INVALID_TYPEType name not in config
INVALID_LABELLabel name not in config
INVALID_DATEDate string cannot be parsed
INVALID_IDReferenced ID (blockedBy, parent, etc.) does not exist
MISSING_REQUIREDRequired flag is missing
ALREADY_EXISTS.mdp/ already exists (on init without --force)
CIRCULAR_DEPENDENCYblockedBy or parent change would create a cycle
WRITE_ERRORFilesystem write failed
PARSE_ERRORMarkdown/YAML parsing failed
INVALID_INPUTInvalid JSON input or missing required fields (used by batch-create, batch-update)
CONFIG_ERRORproject.json is missing or invalid

Example Errors

Invalid Status

mdp issue update --id ISS-1 --status "bogus"
{ "ok": false, "error": { "code": "INVALID_STATUS", "message": "Invalid status \"bogus\"", "details": {} } }

Issue Not Found

mdp issue get --id ISS-999
{ "ok": false, "error": { "code": "ISSUE_NOT_FOUND", "message": "Issue ISS-999 not found", "details": { "id": "ISS-999" } } }

Invalid Label

mdp issue create -t "Test" -l "nonexistent"
{ "ok": false, "error": { "code": "INVALID_LABEL", "message": "Invalid label \"nonexistent\"", "details": {} } }

Circular Dependency

When ISS-2 already has blockedBy: [ISS-1]:

mdp issue update --id ISS-1 --add-blocked-by ISS-2
{ "ok": false, "error": { "code": "CIRCULAR_DEPENDENCY", "message": "Adding ISS-2 to blockedBy of ISS-1 would create a circular dependency", "details": {} } }

Exit Codes

CodeMeaning
0Success
1General error
2Project not found

Warnings

Non-fatal issues are included in the warnings array of successful responses. For example, a command may succeed but include warnings about deprecated usage or other non-critical issues.

Last updated on