Skip to content

Commit 3dbd7db

Browse files
committed
raised some exceptions that were allowed to follow trough and some prints to typer.echo
Signed-off-by: Miguel Brandão <[email protected]>
1 parent 20d8198 commit 3dbd7db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deepsearch/cps/cli/data_indices_typer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def list(
5555
for index in indices
5656
]
5757
except ValueError as e:
58-
print(f"Error occurred: {e}")
58+
raise typer.Abort()
5959

6060
cli_output(results, output, headers="keys")
6161
return

deepsearch/cps/cli/projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def assign_user(
4949
role=role,
5050
)
5151
else:
52-
print("Project not found")
52+
typer.echo("Project not found")
5353
raise typer.Exit(code=1)
5454

5555

@@ -63,7 +63,7 @@ def remove(
6363
if project is not None:
6464
api.projects.remove(project=project)
6565
else:
66-
print("Project not found")
66+
typer.echo("Project not found")
6767
raise typer.Exit(code=1)
6868

6969

0 commit comments

Comments
 (0)