Skip to content

Commit

Permalink
lns: logging message
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Feb 20, 2024
1 parent 730cc96 commit a16664d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""The command line module containing all the commands to filter documents."""

import logging
from typing import Tuple

import click
Expand All @@ -11,6 +12,8 @@
)
from ..utils import create_channel_message

logger = logging.getLogger(__name__)


@click.command()
@click.option(
Expand Down Expand Up @@ -61,6 +64,9 @@ def cli(subjects: Tuple[str, ...], title: str, target: str) -> None:
if response.status_code == 200:
click.echo("Notification sent successfully!")
else:
logger.error(
f"Notification failed with status code: {response.status_code}:{response.text}"
)
click.echo(
f"Notification failed with status code: {response.status_code}:{response.text}",
err=True,
Expand Down

0 comments on commit a16664d

Please sign in to comment.