Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PAN-2672] Return specific and useful error for enclave issues #1455

Merged
merged 5 commits into from Jun 11, 2019

Conversation

Puneetha17
Copy link
Contributor

PR description

This PR gets the error returned from the Orion using regex and propagates is back to the user. This solution is specific to Orion and not any other enclave.

} 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;
Copy link
Contributor

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?

Copy link
Contributor

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()

@ekellstrand ekellstrand merged commit 3d7a93f into PegaSysEng:master Jun 11, 2019
@Puneetha17 Puneetha17 deleted the enclave_error branch July 17, 2019 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants