Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

feat!: respond with already exists grpc error #394

Merged
merged 9 commits into from
Aug 9, 2021
Merged

Conversation

shumkov
Copy link
Member

@shumkov shumkov commented Aug 9, 2021

Issue being fixed or feature implemented

To ease error handling for clients, DAPI should respond with already exists gRPC errors in appropriate cases instead of a more general invalid argument.

What was done?

  • Respond with already exists error in broadcastStateTransition endpoint
  • Respond with already exists error in broadcastTransaction endpoint

How Has This Been Tested?

With unit tests

Breaking Changes

  • Already exists error responded instead of invalid argument if transaction or state transition already exists in chains

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov added this to the v0.21.0 milestone Aug 9, 2021
@shumkov shumkov merged commit 466d37c into v0.21-dev Aug 9, 2021
@shumkov shumkov deleted the alreay-exists branch August 9, 2021 17:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants