Skip to content

docs: add message.path field conventions to Error Handling#397

Open
sbeashwar wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
sbeashwar:docs/message-path-conventions
Open

docs: add message.path field conventions to Error Handling#397
sbeashwar wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
sbeashwar:docs/message-path-conventions

Conversation

@sbeashwar
Copy link
Copy Markdown

The path field on error/warning/info messages is used in examples
throughout the spec but has no prose explaining how to construct it.

Changes to checkout.md:

  • Introduces path in the Error Handling opening paragraph so readers
    know it exists before hitting the severity table, with an anchor link
    to the new subsection.
  • Adds #### The path Field subsection covering RFC 9535 JSONPath,
    snake_case convention, filter expressions, specificity rule, and
    create-vs-update keying differences.
  • Adds path to the invalid_phone entry in the error processing
    example ($.buyer.contact.phone).
  • Updates the error processing algorithm to show how to use path to
    identify the specific field to fix, with fallback to error.code
    when path is absent.

Complements #380 (which fixes the schema descriptions on the
message_* types) with implementation guidance in the spec prose.

@sbeashwar sbeashwar requested review from a team as code owners April 30, 2026 05:34
@sbeashwar
Copy link
Copy Markdown
Author

@yanheChen @alexpark20 @sakinaroufid friendly bump on this - docs addition for the message.path field. CI green, and sakinaroufid (author of related #380) reacted positively. Could you take a look when you get a chance?

@sakinaroufid
Copy link
Copy Markdown
Contributor

@yanheChen @alexpark20 @sakinaroufid friendly bump on this - docs addition for the message.path field. CI green, and sakinaroufid (author of related #380) reacted positively. Could you take a look when you get a chance?

+1

Copy link
Copy Markdown
Contributor

@jingyli jingyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sbeashwar for the doc enhancement! Added some comments, the biggest one is the usage of a non-existent field in UCP.

Comment thread docs/specification/checkout.md Outdated
Comment thread docs/specification/checkout.md Outdated
Comment thread docs/specification/checkout.md
The path field appears in examples throughout the spec but has no
prose explaining how to construct it. Add a conventions section under
Error Handling covering:

- RFC 9535 JSONPath, snake_case property names
- Simple field references, indexed array access, filter expressions
- Why filter expressions are preferred over index-based paths
- Specificity rule (field-level path beats parent-level)
- Create vs. Update keying difference (item.id vs line item id)

Complements PR Universal-Commerce-Protocol#380 which fixes the schema descriptions on the
message_* types.
@sbeashwar sbeashwar force-pushed the docs/message-path-conventions branch from 315ced6 to d5f6805 Compare May 6, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants