Skip to content

Fix: TypeError when generating candidate ID cards - #113

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/id-card-generation-typeerror
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/id-card-generation-typeerror

Conversation

@sentry

@sentry sentry Bot commented Sep 13, 2026

Copy link
Copy Markdown

This PR resolves the TypeError: Cannot read properties of undefined (reading 'operation') that occurred during ID card generation in candidate-list.page.ts.

The root cause was identified as CandidateIdCardService.generate() incorrectly using _authhttp.generateCards(), a method designed for blob downloads, which resulted in undefined being returned to the subscriber. The calling component expected a JSON response containing an 'operation' field.

The fix involves updating src/app/providers/logged-in/candidate.id.card.service.ts to use _authhttp.post() instead of _authhttp.generateCards() within the generate() method. This ensures that the correct JSON response from the API is received and processed by the subscriber, aligning its behavior with other similar methods in the service.

This change aligns with the proposed fix in the unmerged PR #109.

Fixes SH-STAFF-APP-M
Fixes TECH-2165

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

TECH-2165

@netlify

netlify Bot commented Sep 13, 2026

Copy link
Copy Markdown

Deploy Preview for studenthub-staff ready!

Name Link
🔨 Latest commit 4ede25a
🔍 Latest deploy log https://app.netlify.com/projects/studenthub-staff/deploys/6aa6839d60fee8000814c4bc
😎 Deploy Preview https://deploy-preview-113--studenthub-staff.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2a7f2c17-c87d-4435-978e-bb0169f9cca9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

0 participants