Skip to content

review#372

Open
av-javier wants to merge 2 commits into
mainfrom
AB29388/update-public-jsdoc-av-client-verifier
Open

review#372
av-javier wants to merge 2 commits into
mainfrom
AB29388/update-public-jsdoc-av-client-verifier

Conversation

@av-javier

Copy link
Copy Markdown
Contributor

No description provided.

@av-javier av-javier requested review from av-mads and Copilot July 2, 2026 04:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates API documentation to better reflect actual thrown errors in verifier and client methods, and regenerates the published HTML docs accordingly.

Changes:

  • Clarifies AVVerifier.submitVerifierKey to document that failures currently surface as raw Axios errors (not wrapped in NetworkError).
  • Refines AVClient.extendVoterSessions documentation around the pre-registration failure mode.
  • Updates the generated TypeDoc HTML pages to match the updated JSDoc.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
lib/av_verifier.ts Updates @throws documentation for submitVerifierKey.
lib/av_client.ts Updates @throws documentation for extendVoterSessions.
docs/classes/av_verifier.AVVerifier.html Regenerated docs reflecting the updated AVVerifier throws text.
docs/classes/av_client.AVClient.html Regenerated docs reflecting the updated AVClient throws text.
Comments suppressed due to low confidence (1)

lib/av_client.ts:629

  • extendVoterSessions currently throws a runtime TypeError when called before registration because it dereferences this.voterSession without checking for it. Since this is a public API and other methods use InvalidStateError for precondition violations, it would be more consistent (and safer for consumers) to explicitly guard and throw InvalidStateError instead of leaking a TypeError.
   * @throws TypeError if called before voter registration (`this.voterSession` is undefined — the method dereferences it directly without a null check).
   * @throws {@link NetworkError | NetworkError} if any request failed to get a response.
   */
  public async extendVoterSessions(extendedBy: number): Promise<void> {
    if (!this.voterSession.address) return;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants