Skip to content

Seqauto API: an unregistered sequencer model or enrichment kit is a 400, not a 500 (#2941) - #2943

Merged
davmlaw merged 1 commit into
masterfrom
2941_seqauto_lookup_400
Nov 30, 2026
Merged

davmlaw merged 1 commit into
masterfrom
2941_seqauto_lookup_400

Conversation

@davmlaw

@davmlaw davmlaw commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

🤖 Written by Claude

For #2941.

The seqauto API is built up in parts: each object is created through its own endpoint, and later posts refer to it by key. SequencerModelSerializer.get_object and EnrichmentKitSerializer.get_from_data called .get() without catching DoesNotExist. They now raise serializers.ValidationError naming the missing object and the endpoint that creates it (api/v1/sequencer_model, api/v1/enrichment_kit), as SampleSheetLookupSerializer and SequencingSampleLookupSerializer already do. Neither creates the missing object.

The kit lookup covers the run's enrichment_kit and each sample's on a posted sample sheet.

Tests: seqauto.tests.test_api_unknown_references (a sequencer with an unknown model, a run with an unknown kit) errors on master and passes here. Seqauto tests pass (178).

…eet naming an unregistered enrichment kit, is a 400 saying which endpoint creates it, as the sample sheet and sequencing sample lookups already are, rather than a 500 #2941
@davmlaw
davmlaw merged commit 83248f9 into master Nov 30, 2026
4 checks passed
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