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

RPC methods to return error #542

Merged
merged 3 commits into from
Mar 27, 2024
Merged

RPC methods to return error #542

merged 3 commits into from
Mar 27, 2024

Conversation

rianhughes
Copy link
Contributor

No description provided.

@rianhughes rianhughes force-pushed the rianhughes/rpcErr branch 2 times, most recently from 5d1825f to c7864d5 Compare March 15, 2024 14:03
@rianhughes
Copy link
Contributor Author

Note: errors_test.go shows that rpc methods return an error type (so err!=nil executes as expected), but retains the rich RPC error information.

account/account.go Outdated Show resolved Hide resolved
rpc/block_test.go Outdated Show resolved Hide resolved
rpc/contract.go Outdated Show resolved Hide resolved
rpc/errors_test.go Outdated Show resolved Hide resolved
rpc/mock_test.go Outdated Show resolved Hide resolved
@rianhughes rianhughes requested a review from kirugan March 25, 2024 07:42
@@ -458,7 +458,7 @@ func TestSignMOCK(t *testing.T) {
func TestAddInvoke(t *testing.T) {

type testSetType struct {
ExpectedError *rpc.RPCError
ExpectedError error
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExpectedErr ?

@rianhughes rianhughes merged commit b6b1052 into main Mar 27, 2024
3 checks passed
@rianhughes rianhughes deleted the rianhughes/rpcErr branch March 27, 2024 07:57
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 this pull request may close these issues.

2 participants