Skip to content

Fix candidate ID card generation response handling - #106

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

Fix candidate ID card generation response handling#106
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/id-card-generation-response

Conversation

@sentry

@sentry sentry Bot commented Aug 2, 2026

Copy link
Copy Markdown

This PR addresses the TypeError: undefined is not an object (evaluating 'r.operation') occurring during candidate ID card generation (SH-STAFF-APP-4).

Changes Made:

  • In src/app/providers/logged-in/candidate.id.card.service.ts, the generate() method was updated.
  • The call to this._authhttp.generateCards() was replaced with this._authhttp.post(url, { candidates }).

Reasoning:

  • The generateCards() method was intended for downloading a zip file and, due to its implementation, implicitly returned undefined from its map operator.
  • The calling component (candidate-search.page.ts) expected a JSON response containing fields like operation and cir_uuid.
  • This mismatch caused the TypeError when the caller attempted to access properties on the undefined response.
  • By switching to this._authhttp.post(), the service now correctly returns the API's JSON response, aligning with the caller's expectations and resolving the error. Any file download functionality should now be handled by the caller based on the content of the JSON response.

Fixes SH-STAFF-APP-4
Fixes TECH-2011

@linear-code

linear-code Bot commented Aug 2, 2026

Copy link
Copy Markdown

TECH-2011

@netlify

netlify Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploy Preview for studenthub-staff ready!

Name Link
🔨 Latest commit c104c35
🔍 Latest deploy log https://app.netlify.com/projects/studenthub-staff/deploys/6a6fcce6471ef20008e15b23
😎 Deploy Preview https://deploy-preview-106--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.

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