Skip to content

Revising M Spec to Reflect Structured Error Messages#391

Open
bgribaudo wants to merge 5 commits intoMicrosoftDocs:mainfrom
bgribaudo:error-revisions
Open

Revising M Spec to Reflect Structured Error Messages#391
bgribaudo wants to merge 5 commits intoMicrosoftDocs:mainfrom
bgribaudo:error-revisions

Conversation

@bgribaudo
Copy link
Contributor

M was revised a while back to support structured error messages (e.g. error messages defined as a template + parameters for string interpolation). Also, an error code field has been added to errors in the (somewhat?) recent past.

This edit revises the spec. to reflect these changes. It also changes how defining an error is presented by directly stating the expected record structure, removing the use of/reliance on standard library function Error.Record.

@prmerger-automator
Copy link
Contributor

@bgribaudo : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 7004be1:

⚠️ Validation status: warnings

File Status Preview URL Details
query-languages/m/m-spec-error-handling.md ⚠️Warning Details

query-languages/m/m-spec-error-handling.md

  • Line 5, Column 10: [Warning: ms-date-invalid - See documentation] Invalid date format for 'ms.date': '1/29/26'. If specified, must be a date in format M/D/YYYY, no more than 30 days from today. If you don't specify ms.date, the date will be updated automatically.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 20fa09e:

✅ Validation status: passed

File Status Preview URL Details
query-languages/m/m-spec-error-handling.md ✅Succeeded

For more details, please refer to the build report.

@v-dirichards
Copy link
Contributor

@whhender

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged tracking label for the PR review team label Jan 29, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the M Language specification for error handling to reflect structured error messages that were introduced in recent revisions. The changes document the new error value structure with support for message templates and string interpolation.

Changes:

  • Added documentation for the canonical error value record structure including new fields: ErrorCode, Message.Format, and Message.Parameters
  • Documented string interpolation syntax using #{x} placeholders in Message.Format
  • Removed reliance on the Error.Record function for defining error structure, instead directly specifying the expected record format
  • Updated documentation date to reflect changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit d483653:

✅ Validation status: passed

File Status Preview URL Details
query-languages/m/m-spec-error-handling.md ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 0745bfb:

✅ Validation status: passed

File Status Preview URL Details
query-languages/m/m-spec-error-handling.md ✅Succeeded

For more details, please refer to the build report.

@Court72
Copy link
Contributor

Court72 commented Jan 30, 2026

@ehrenMSFT, @whhender

If the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants