Skip to content

fix: correct job creation API response type handling#410

Merged
dsclassen merged 1 commit intomainfrom
fix/job-creation-response-type
Feb 12, 2026
Merged

fix: correct job creation API response type handling#410
dsclassen merged 1 commit intomainfrom
fix/job-creation-response-type

Conversation

@dsclassen
Copy link
Collaborator

Summary

Fixed "Cannot read properties of undefined (reading 'uuid')" error that occurred when submitting new jobs through the web UI.

The root cause was a type mismatch between the backend API response and frontend expectations:

  • Backend returns: {jobid, uuid, md_engine, message} (flat structure)
  • Frontend expected: BilboMDJobDTO with nested mongo field

Changes Made

  • Added JobCreationResponse interface to match actual backend response structure
  • Updated all job creation mutations in jobsApiSlice.ts to use JobCreationResponse:
    • addNewJob
    • addNewAutoJob
    • addNewAlphaFoldJob
    • addNewSANSJob
    • addNewScoperJob
    • addNewMultiJob
  • Fixed response handling in all job form components to access flat structure instead of nested mongo field

Test plan

  • Linting passes: pnpm -F @bilbomd/ui lint
  • Build succeeds: pnpm -F @bilbomd/ui build
  • All tests pass: pnpm -F @bilbomd/ui test (483 tests)
  • Manual testing: Submit new Classic job and verify success alert displays correctly
  • Manual testing: Submit Auto, AlphaFold, SANS, and Scoper jobs to verify all job types work

🤖 Generated with Claude Code

Fixed "Cannot read properties of undefined (reading 'uuid')" error
that occurred when submitting new jobs. The backend returns a flat
response structure {jobid, uuid, md_engine}, but frontend expected
nested BilboMDJobDTO structure with mongo field.

Changes:
- Added JobCreationResponse interface in jobsApiSlice
- Updated all job creation mutations to use JobCreationResponse
- Fixed response handling in all job form components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: df30cd4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bilbomd/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dsclassen dsclassen merged commit f8df12b into main Feb 12, 2026
28 of 30 checks passed
@dsclassen dsclassen deleted the fix/job-creation-response-type branch February 12, 2026 01:20
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.

1 participant