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

Print more useful error msgs to syserr for service provider errors #858

Merged
merged 4 commits into from
Aug 20, 2019

Conversation

chris-j-h
Copy link
Collaborator

@chris-j-h chris-j-h commented Aug 19, 2019

Fixes #859

By also printing the root cause exception, additional useful information will be presented to the user.

Before

com.quorum.tessera.config.apps.TesseraApp: Provider com.quorum.tessera.p2p.P2PRestApp could not be instantiated

After

com.quorum.tessera.config.apps.TesseraApp: Provider com.quorum.tessera.p2p.P2PRestApp could not be instantiated
com.quorum.tessera.key.vault.hashicorp.HashicorpCredentialNotSetException: Only one of the HASHICORP_ROLE_ID and HASHICORP_SECRET_ID environment variables to authenticate with Hashicorp Vault using the AppRole method has been set

…vider

For example, incorrectly configuring a remote enclave/key vault results in a generic "Provider com.quorum.tessera.p2p.P2PRestApp could not be instantiated" msg presented to the user.  By also printing the cause's msg, the BeanCreationExceptions msg  is printed, showing the user the exact cause of the error.
prd-fox
prd-fox previously approved these changes Aug 19, 2019
@codecov-io
Copy link

codecov-io commented Aug 19, 2019

Codecov Report

Merging #858 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #858      +/-   ##
============================================
+ Coverage     99.44%   99.45%   +0.01%     
  Complexity     2076     2076              
============================================
  Files           311      311              
  Lines          6096     6095       -1     
  Branches        312      311       -1     
============================================
  Hits           6062     6062              
  Misses            5        5              
+ Partials         29       28       -1
Impacted Files Coverage Δ Complexity Δ
.../quorum/tessera/sync/SyncResponseMessageCodec.java 100% <0%> (+3.22%) 5% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e17aea...78c5af6. Read the comment docs.

@melowe melowe merged commit d2ec968 into master Aug 20, 2019
@melowe melowe deleted the bugfix/better-error-msgs branch August 20, 2019 13:22
chris-j-h added a commit that referenced this pull request Sep 2, 2019
)

* Print more useful msgs to syserr for errors involving the service provider

For example, incorrectly configuring a remote enclave/key vault results in a generic "Provider com.quorum.tessera.p2p.P2PRestApp could not be instantiated" msg presented to the user.  By also printing the cause's msg, the BeanCreationExceptions msg  is printed, showing the user the exact cause of the error.

* Don't print stacktrace, enough info should be present in the msg

* Print top level error message and details of root exception
@Krish1979 Krish1979 added 0.10.1 and removed 0.11 labels Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.10.1 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors involving the service provider on startup are not very useful
5 participants