Skip to content

Commit f974d55

Browse files
xiliuStrateosEribertoLopez
authored andcommitted
STDV-806 stdout protocol generation error message info (#214)
* stdout protocol generation error message info in protocol launch request
1 parent 43b553d commit f974d55

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Changelog
22
=========
3+
v9.4.2
4+
------
5+
6+
Added
7+
~~~~~
8+
- Stdout the detail error_info of the `generation_errors` in the launch request.
39

410
v9.4.1
511
------

transcriptic/commands.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,21 @@ def launch(
961961
if len(generation_errs) > 0:
962962
for errors in generation_errs:
963963
click.echo("\n\n" + str(errors["message"]))
964+
if errors.get("info"):
965+
errors_info = errors.get("info")
966+
indexes = [
967+
idx
968+
for idx in range(len(errors_info))
969+
if errors_info.startswith("Error", idx)
970+
or errors_info.startswith("error", idx)
971+
]
972+
# 100 length should give enough information
973+
errors_info_msgs = [
974+
str(errors_info[idx : idx + 100]) for idx in indexes
975+
]
976+
for info_msg in errors_info_msgs:
977+
click.echo("\n" + info_msg)
978+
964979
click.echo("\nPlease fix the above errors and try again.")
965980
return
966981

0 commit comments

Comments
 (0)