Skip to content

Issue with the list option #14

@sebastien-dol

Description

@sebastien-dol

Hello,
I am currently encountering a problem when using the list option:

tcs_garr-0.25.1]$ tcs-garr list 
Retrieving certificates...
API request failed with status code 429: Too many requests. Please try again later.
Traceback (most recent call last):
  File "/home/seb/Téléchargements/tcs_garr-0.25.1/venv/lib64/python3.11/site-packages/requests/models.py", line 965, in json
    return complexjson.loads(self.content.decode(encoding), **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

However, when I use list with the --full option, it works.

It also seems that when using --full, the certificate ID is not returned.
Additionally, when I filter on an FQDN, I can still see all previously created certificates across all statuses:

tcs-garr list --status All --fqdn test6.agriculture.rie.gouv.fr --full

This returns results for Revoked, Completed, Valid, and Expired certificates:

tcs-garr list --status All --fqdn test6.agriculture.rie.gouv.fr --full
Retrieving certificates...
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| ID   | Common Name                   | Expire at           | Status    | Info       | Alt Names                     | Requested by     | Type   |
+======+===============================+=====================+===========+============+===============================+==================+========+
| None | test6.agriculture.rie.gouv.fr | 2026-06-25T14:28:58 | Revoked   | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 2026-06-25T14:28:58 | Completed | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 2026-06-25T08:51:52 | Revoked   | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 2026-06-25T08:51:52 | Completed | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 2026-06-25T08:39:39 | Revoked   | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 2026-06-25T08:39:39 | Completed | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 0001-01-01T00:00:00 | Valid     | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 0001-01-01T00:00:00 | Valid     | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 0001-01-01T00:00:00 | Valid     | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 0001-01-01T00:00:00 | Expired   | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 0001-01-01T00:00:00 | Expired   | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
| None | test6.agriculture.rie.gouv.fr | 0001-01-01T00:00:00 | Expired   | 26/06/2025 | test6.agriculture.rie.gouv.fr | Requester Harica | API    |
+------+-------------------------------+---------------------+-----------+------------+-------------------------------+------------------+--------+
Total certificates: 12
Certificates with status VALID: 3
Certificates with status REVOKED: 3
Certificates with status EXPIRED: 3
Certificates with status COMPLETED: 3

But this certificate is no longer valid, and all of these versions have been revoked.
I checked in the Harica web interface, and there is no longer any trace of this certificate under "Valid", only under "Revoked".
I am using version 0.25.1.
Have you ever encountered similar issues?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions