Skip to content

Allowing partial success in batch requests. - #1070

Merged
juanfranblanco merged 3 commits into
Nethereum:masterfrom
dlebee:master
Mar 21, 2025
Merged

juanfranblanco merged 3 commits into
Nethereum:masterfrom
dlebee:master

Conversation

@dlebee

@dlebee dlebee commented Mar 21, 2025

Copy link
Copy Markdown
Contributor

The Goal of this PR is to allow batch request to partially fail.

errors.Add(new RpcError(response.Error.Code, response.Error.Message + ": " + batchItem.RpcRequestMessage.Method,
response.Error.Data));
batchItem.DecodeResponse(response);
errors.Add(new RpcError(response.Error.Code, response.Error.Message + ": " + batchItem.RpcRequestMessage.Method, response.Error.Data));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I could use batchItem.RpcError to add to errors, but the RpcError object wasn't created the same way, so just in case people expected a specific string already, i did not want to break their compability.

@dlebee dlebee left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added a comment about why i kept the error.

@juanfranblanco
juanfranblanco merged commit eb0a632 into Nethereum:master Mar 21, 2025
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