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

(PUP-11928) Give more specific error messages for /puppet/v3/tasks API #9104

Conversation

AriaXLi
Copy link
Contributor

@AriaXLi AriaXLi commented Sep 7, 2023

Currently, when a task is omitted due to a failure, Puppet Server logs an exception with a generic error message and provides no details on how to resolve the error: ERROR [qtp1527520408-905] [puppetserver] Puppet Failed to validate task

This commit removes the generic message that overrides the original error message in the rescued error. Instead, the rescued error message is logged.

@AriaXLi AriaXLi requested a review from a team as a code owner September 7, 2023 16:52
@AriaXLi
Copy link
Contributor Author

AriaXLi commented Sep 7, 2023

Error message before my change:
2023-09-07T16:55:42.913Z ERROR [qtp2067868939-55] [puppetserver] Puppet Failed to validate task

Error message after my change:
2023-09-07T16:38:48.596Z ERROR [qtp138393205-57] [puppetserver] Puppet Multiple executables were found in directory /etc/puppetlabs/code/environments/production/modules/task_tst/tasks/hello.sh for task task_tst::hello; define 'implementations' in metadata to differentiate between them

@AriaXLi AriaXLi force-pushed the PUP-11928/puppet/v3/tasks_API_error_messages branch from 020ea1f to bfdf5b1 Compare September 7, 2023 17:02
Currently, when a task is omitted due to a failure, Puppet Server logs an
exception with a generic error message and provides no details on how to
resolve the error: `ERROR [qtp1527520408-905] [puppetserver] Puppet Failed to
validate task`

This commit removes the generic message that overrides the original error message in
the rescued error. Instead, the rescued error message is logged.
@AriaXLi AriaXLi force-pushed the PUP-11928/puppet/v3/tasks_API_error_messages branch from bfdf5b1 to 3973318 Compare September 7, 2023 17:22
@joshcooper joshcooper merged commit db2cf67 into puppetlabs:main Sep 7, 2023
10 checks passed
@AriaXLi AriaXLi deleted the PUP-11928/puppet/v3/tasks_API_error_messages branch September 7, 2023 20:17
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