Skip to content

feat: add data, statusCode, headers to error directive JSON schema#352

Open
Simone Moglianesi @make.com (SM0gMaker) wants to merge 1 commit into
masterfrom
feat/error-data-statuscode-headers
Open

feat: add data, statusCode, headers to error directive JSON schema#352
Simone Moglianesi @make.com (SM0gMaker) wants to merge 1 commit into
masterfrom
feat/error-data-statuscode-headers

Conversation

@SM0gMaker
Copy link
Copy Markdown

IEN-15364

https://make.atlassian.net/browse/IEN-15364

Description

Updates the Monaco JSON schema (response.json) to allow data, statusCode, and headers properties in the #error directive — both at the top level and within status-code-specific overrides (^[0-9]{3}$). Mirrors the same schema change applied to imt-web-zone. Resolves "Property is not allowed" validation errors in the VS Code extension for these new fields.

Diamond

https://make.atlassian.net/wiki/spaces/RD/database/3064659981?contentId=3064659981&entryId=9fc99097-088a-4a5d-ac80-3f1ba12a5545&savedViewId=bb67ecdc-219a-4e3b-a753-8d9fc32be6b3

Add the new error directive properties to the Monaco JSON Schema
so they are no longer flagged as "Property is not allowed":

- data: custom data to pass through the error handling path
- statusCode: HTTP status code or custom status code (number)
- headers: response headers to pass through the error handling path

Added to both top-level error properties and per-status-code
patternProperties (^[0-9][0-9][0-9]$).

Ref: IEN-15364
Copilot AI review requested due to automatic review settings May 19, 2026 22:10
@github-actions
Copy link
Copy Markdown

Messages
Your PR title & description are valid

Generated 20. 5. 2026 0:11:13 GMT+2 for 63f70f4

Copy link
Copy Markdown

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

Updates the IML Monaco JSON schema for the #error directive to accept additional fields used by error handling, aligning the VS Code extension validation behavior with other SDKs/modules.

Changes:

  • Allow data, statusCode, and headers on the top-level #error directive object.
  • Allow data, statusCode, and headers inside status-code-specific overrides (^[0-9]{3}$) within #error.
Comments suppressed due to low confidence (2)

syntaxes/imljson/schemas/response.json:103

  • Same as the top-level statusCode: type: ["number", "string"] permits non-integer/out-of-range status codes. For consistency with definitions.respond.properties.status, consider using oneOf with an integer 100–999 or a string expression here too.
								"statusCode": {
									"description": "HTTP status code or custom status code.",
									"type": ["number", "string"]
								},

syntaxes/imljson/schemas/response.json:106

  • Same as the top-level headers: this is currently an unconstrained schema, while other schema locations use sources.json#/definitions/headers to validate header objects. Consider using the shared $ref here so status-code-specific overrides validate the same way.
								"headers": {
									"description": "Response headers to pass through the error handling path."
								}

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

Comment thread syntaxes/imljson/schemas/response.json
Comment thread syntaxes/imljson/schemas/response.json
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.

2 participants