Actually the client.hasAlreadyVoted uses the endpoint /votes/{vote_id} to check if a voter has already vote. This throws a 404 on the case that the vote is no emitted, causing a javascipt error on the console, which is not ideal.
A solution could be to implement a /hasVoted endpoint which will have the same logic of /votes/{vote_id} but returning true or false (or 204 and the vote).
Absolutely a non necessary enhancement that can be interesting to have, that can save debugging time to the sdk users.
Actually the
client.hasAlreadyVoted
uses the endpoint/votes/{vote_id}
to check if a voter has already vote. This throws a 404 on the case that the vote is no emitted, causing a javascipt error on the console, which is not ideal.A solution could be to implement a
/hasVoted
endpoint which will have the same logic of/votes/{vote_id}
but returning true or false (or 204 and the vote).Absolutely a non necessary enhancement that can be interesting to have, that can save debugging time to the sdk users.
Related https://discord.com/channels/756181194357604548/985621870047002735/1174318990353498122