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

Added raw data to fetchElection when function throws error #392

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

marcvelmer
Copy link
Collaborator

@marcvelmer marcvelmer commented Jul 4, 2024

Fixes #391

Copy link

github-actions bot commented Jul 4, 2024

size-limit report 📦

Path Size
dist/index.js 1.54 MB (+0.01% 🔺)
dist/index.mjs 1.54 MB (+0.01% 🔺)
dist/index.umd.js 1.55 MB (+0.01% 🔺)

@elboletaire
Copy link
Member

I still feel like the return could be some kind of custom error type...

try {
  electionInfo = this.decryptMetadata(electionInformation, password);
  censusInfo = await this.buildCensus(electionInfo);
} catch (e) {
  throw new InvalidElectionError(e, electionId, electionInformation);
}

@marcvelmer marcvelmer merged commit a496a36 into main Jul 4, 2024
10 checks passed
@marcvelmer marcvelmer deleted the f/add_raw_data_fetch_election branch July 4, 2024 12:10
selankon added a commit to vocdoni/explorer that referenced this pull request Jul 16, 2024
Based on this SDK PR vocdoni/vocdoni-sdk#392, a button with raw election info can be shown when election fails to be instantiated.
selankon added a commit to vocdoni/explorer that referenced this pull request Jul 16, 2024
Based on this SDK PR vocdoni/vocdoni-sdk#392, a button with raw election info can be shown when election fails to be instantiated.
elboletaire pushed a commit to vocdoni/explorer that referenced this pull request Jul 17, 2024
* Bump @vocdoni/[email protected]

* Show raw button on error

Based on this SDK PR vocdoni/vocdoni-sdk#392, a button with raw election info can be shown when election fails to be instantiated.
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.

feature: standarize election return for all methods returning elections
2 participants