This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-2672] Return specific and useful error for enclave issues #1455
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iikirilov
suggested changes
May 17, 2019
...pantheon/ethereum/mainnet/precompiles/privacy/PrivacyPrecompiledContractIntegrationTest.java
Outdated
Show resolved
Hide resolved
...a/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/privacy/EeaSendRawTransaction.java
Outdated
Show resolved
Hide resolved
enclave/src/main/java/tech/pegasys/pantheon/enclave/Enclave.java
Outdated
Show resolved
Hide resolved
iikirilov
suggested changes
May 17, 2019
enclave/src/main/java/tech/pegasys/pantheon/enclave/Enclave.java
Outdated
Show resolved
Hide resolved
enclave/src/main/java/tech/pegasys/pantheon/enclave/Enclave.java
Outdated
Show resolved
Hide resolved
ekellstrand
reviewed
May 22, 2019
...test/java/tech/pegasys/pantheon/tests/web3j/privacy/PrivateTxEnclaveErrorAcceptanceTest.java
Outdated
Show resolved
Hide resolved
...test/java/tech/pegasys/pantheon/tests/web3j/privacy/PrivateTxEnclaveErrorAcceptanceTest.java
Outdated
Show resolved
Hide resolved
enclave/src/main/java/tech/pegasys/pantheon/enclave/Enclave.java
Outdated
Show resolved
Hide resolved
...a/tech/pegasys/pantheon/ethereum/mainnet/precompiles/privacy/PrivacyPrecompiledContract.java
Outdated
Show resolved
Hide resolved
...eum/core/src/main/java/tech/pegasys/pantheon/ethereum/privacy/PrivateTransactionHandler.java
Outdated
Show resolved
Hide resolved
} catch (IOException e) { | ||
LOG.error("Failed to store private transaction in enclave", e); | ||
} catch (Exception e) { | ||
LOG.error("Failed to store private transaction in enclave {}", e.getMessage()); | ||
throw e; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this throw a new exception that wraps e and includes the log message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially this can be done, but that is for another PR. The exception is caught in EeaSendRawTransaction
and converted to a JSON-RPC response using e.getMessage()
...a/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/privacy/EeaSendRawTransaction.java
Outdated
Show resolved
Hide resolved
...rpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/response/JsonRpcError.java
Show resolved
Hide resolved
iikirilov
force-pushed
the
enclave_error
branch
12 times, most recently
from
May 29, 2019 16:33
9573885
to
f513c11
Compare
ekellstrand
approved these changes
Jun 11, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description
This PR gets the error returned from the
Orion
using regex and propagates is back to the user. This solution is specific toOrion
and not any other enclave.