Repository navigation
Seqauto API: an unregistered sequencer model or enrichment kit is a 400, not a 500 (#2941) - #2943
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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_objectandEnrichmentKitSerializer.get_from_datacalled.get()without catchingDoesNotExist. They now raiseserializers.ValidationErrornaming the missing object and the endpoint that creates it (api/v1/sequencer_model,api/v1/enrichment_kit), asSampleSheetLookupSerializerandSequencingSampleLookupSerializeralready do. Neither creates the missing object.The kit lookup covers the run's
enrichment_kitand 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).