Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Report full error for schema violations #4933

Closed
mikeharder opened this issue Mar 29, 2024 · 0 comments
Closed

[v2] Report full error for schema violations #4933

mikeharder opened this issue Mar 29, 2024 · 0 comments
Assignees

Comments

@mikeharder
Copy link
Member

When reporting schema violations, I think we should include the full dump of the error object, not just the message.

for (const error of errors) {
config.Message({
Channel: Channel.Error,
Details: error,
Plugin: "schema-validator",
Source: [{ document: fileIn.key, Position: { path: parseJsonPointer(error.path) } as any }],
Text: `Schema violation: ${error.message}`
});
}

Replace error.message with something like JSON.stringify(error).

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

No branches or pull requests

1 participant