dedis / d-voting

📧 E-Voting platform based on the Dela blockchain
https://dedis.github.io/d-voting
BSD 3-Clause "New" or "Revised" License
18 stars 7 forks source link

Define DKG error code #139

Open cmsigrist opened 2 years ago

cmsigrist commented 2 years ago

The DKG return the status Failed when the user tries to setup a node that is already Setup. Currently, the front-end checks during the polling the content of the error message and ignores the error if it contains the string "setup() was already called, only one call is allowed" (marking the Promise as resolved with the status Setup). An error code, corresponding to this case should be defined instead.

nkcr commented 2 years ago

True. The frontend can define (and document) one. The backend will then adapt.