diff --git a/leggen/commands/sync.py b/leggen/commands/sync.py index 4415b06..2f8baff 100644 --- a/leggen/commands/sync.py +++ b/leggen/commands/sync.py @@ -119,5 +119,5 @@ def sync(ctx: click.Context): for account in accounts: try: save_transactions(ctx, account) - except Exception as e: - error(f"[{account}] Error: Sync failed, skipping account. Exception: {e}") + except Exception: + error(f"[{account}] Error: Sync failed, skipping account.") diff --git a/leggen/utils/network.py b/leggen/utils/network.py index 266abc6..3337a54 100644 --- a/leggen/utils/network.py +++ b/leggen/utils/network.py @@ -14,7 +14,7 @@ def get(ctx: click.Context, path: str, params: dict = {}): try: res.raise_for_status() except Exception as e: - error(f"Error: {e}") + error(f"Error: {e}\n{res.text}") ctx.abort() return res.json() @@ -29,7 +29,7 @@ def post(ctx: click.Context, path: str, data: dict = {}): try: res.raise_for_status() except Exception as e: - error(f"Error: {e}") + error(f"Error: {e}\n{res.text}") ctx.abort() return res.json() @@ -44,7 +44,6 @@ def put(ctx: click.Context, path: str, data: dict = {}): try: res.raise_for_status() except Exception as e: - error(f"Error: {e}") - error(res.text) + error(f"Error: {e}\n{res.text}") ctx.abort() return res.json()