Skip to content

Commit

Permalink
Improved error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
diitaz93 committed Feb 20, 2024
1 parent d47f8f6 commit fa4d204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ def _validate_index2_cycles(self) -> None:
index_sequence=self.sample[SampleSheetBCLConvertSections.Data.INDEX_2],
):
return
message: str = f"Incorrect index2 cycle {index2_cycle} for sample {self.sample_id}"
message: str = (
f"Index2 cycle {index2_cycle} of sample {self.sample_id} "
f"does not match with run cycle {self.run_index2_cycles}"
)
LOG.error(message)
raise OverrideCyclesError(message)

Expand Down
2 changes: 1 addition & 1 deletion cg/cli/demultiplex/sample_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def validate_sample_sheet(context: CGConfig, sheet: click.Path):
try:
sample_sheet_api.validate(Path(sheet))
except (SampleSheetError, ValidationError) as error:
LOG.warning(error)
LOG.error("Sample sheet failed validation")
raise click.Abort from error
LOG.info("Sample sheet passed validation")

Expand Down

0 comments on commit fa4d204

Please sign in to comment.