This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 68aaeb4ec4e3dc4721e10289e9426b9a5b23b699 Author: Pasquale Congiusti <[email protected]> AuthorDate: Wed Apr 21 17:25:41 2021 +0200 fix(trait): default error handler configuration setting --- pkg/trait/error_handler.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/trait/error_handler.go b/pkg/trait/error_handler.go index 2b57738..eadaa70 100644 --- a/pkg/trait/error_handler.go +++ b/pkg/trait/error_handler.go @@ -110,7 +110,12 @@ func parseErrorHandler(errorHandlerSpec v1.ErrorHandlerSpec) (string, error) { case "no": return `errorHandler(noErrorHandler());`, nil case "default": - return `errorHandler(defaultErrorHandler());`, nil + errorHandlerConfiguration, err := parseErrorHandlerConfiguration(errorHandlerSpec.Configuration) + if err != nil { + return "", err + } + + return fmt.Sprintf(`errorHandler(defaultErrorHandler()%v);`, errorHandlerConfiguration), nil case "dead-letter-channel": errorHandlerConfiguration, err := parseErrorHandlerConfiguration(errorHandlerSpec.Configuration) if err != nil {
