puppetlabs / puppetserver

Server automation framework and application
https://tickets.puppetlabs.com/browse/SERVER
Apache License 2.0
292 stars 235 forks source link

(PE-37145) ensure schema failures are verbosely logged #2824

Closed jonathannewman closed 6 months ago

jonathannewman commented 6 months ago

Prior to this change, a failure in schema checks would provide minimal useful context in the logs around what the schema error was. This adds specific handling for schema failures to log them more verbosely as well as forming a json error payload that contains the schema failures.

Prior to this change, the default handler for jetty was generating a generic error page with the schema failure. Given that the consumers of this endpoint are not often webbrowsers, this form of content was deemed less useful than a json response with the details.