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

better error handling when bad usage of system properties #879

Closed
maxandersen opened this issue Jan 24, 2023 · 0 comments · Fixed by #880
Closed

better error handling when bad usage of system properties #879

maxandersen opened this issue Jan 24, 2023 · 0 comments · Fixed by #880

Comments

@maxandersen
Copy link

in quarkusio/quarkus#30536 is found that if you put an object into system properties (object that is not a string) then smallrye config fails with a cryptic message.

java.util.ServiceConfigurationError: org.eclipse.microprofile.context.spi.ContextManagerExtension: io.smallrye.mutiny.context.MutinyContextManagerExtension not a subtype

Leaving users guessing what just failed.

o.smallrye.config.common.utils.ConfigSourceUtil.propertiesToMap(Properties) assumes all values can convert to meaningful string - that is not always the case.

I would expect:

a) if smallrye config insist on globally converting all properties in system properties and an error happens that the exception at least includes a hint of what key failed to convert
b) consider if it is reasonable to have all values in system properties be "toString"'able - should it maybe log an error or warning over failing hard?

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 a pull request may close this issue.

1 participant