original_docstring: Catch execpetions and return cli printable errors.
docstring: Catch execpetions and return cli printable errors.
docstring_tokens: Catch execpetions and return cli printable errors .
code: def cli_wrapper(func):
      """Catch execpetions and return cli printable errors."""
  
      @functools.wraps(func)
      def decorator(*args, **kwargs):
          try:
              return func(*args, **kwargs)
          except AdacordApiError as err:
              typer.echo(
                  typer.style(
                      f"Error: {err.message}", fg=typer.colors.RED, bold=True
                  )
              )
          except json.JSONDecodeError:
              typer.echo(
                  typer.style(
                      "Ouch.... something bad happened :/",
                      fg=typer.colors.RED,
                      bold=True,
                  )
              )
  
      return decorator
code_tokens: def cli_wrapper ( func ) : @ functools . wraps ( func ) def decorator ( * args , ** kwargs ) : try : return func ( * args , ** kwargs ) except AdacordApiError as err : typer . echo ( typer . style ( f"Error: {err.message}" , fg = typer . colors . RED , bold = True ) ) except json . JSONDecodeError : typer . echo ( typer . style ( "Ouch.... something bad happened :/" , fg = typer . colors . RED , bold = True , ) ) return decorator
short_docstring: Catch execpetions and return cli printable errors.
short_docstring_tokens: Catch execpetions and return cli printable errors .
comment: """Catch execpetions and return cli printable errors."""