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

doc how to handle "Failed to load config value of type class java.lang.String for: some-key" #37929

Closed
maxandersen opened this issue Dec 25, 2023 · 1 comment · Fixed by #37997
Labels
Milestone

Comments

@maxandersen
Copy link
Contributor

Describe the bug

https://quarkus.io/guides/lifecycle does not seem to mention anything about how users are supposed to handle
"Failed to load config value of type class java.lang.String for: some-key".

seems exception is recorded then never thrown and quarkus app just exits.

this doc should mention the existence of exitHandler argument on quarkus.run

Expected behavior

that docs mentions how users can handle the error and that exception is bubbled up for user to handle and exit code is not just 0.

Quarkus.run(hassq.class, (exitCode, error) -> {
            System.out.println("Exit code: " + exitCode);
            System.out.println("Error: " + error);
          }, args);

exit handler is called with exitcode and actual exception WITHOUT printing that "failed to load config value".

open questions: what happens if multiple errors?

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@maxandersen maxandersen added the kind/bug Something isn't working label Dec 25, 2023
@maxandersen
Copy link
Contributor Author

maxandersen commented Dec 25, 2023

and how to do exit in the handler?

calling System.exit(..) results in devmode failing to work.

@geoand geoand added kind/enhancement New feature or request area/documentation and removed kind/bug Something isn't working triage/needs-triage labels Jan 3, 2024
@quarkus-bot quarkus-bot bot added this to To do in Quarkus Documentation Jan 3, 2024
geoand added a commit to geoand/quarkus that referenced this issue Jan 3, 2024
Quarkus Documentation automation moved this from To do to Done Jan 3, 2024
geoand added a commit that referenced this issue Jan 3, 2024
Mention exit handler parameter variant of Quarkus.run
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Jan 3, 2024
@gsmet gsmet modified the milestones: 3.7 - main, 3.6.5 Jan 9, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants