My k8s cronjob has started consistently erroring out.
$ kubectl logs anti-link-rot-29447040-v9gpf
https://www.bentasker.co.uk/posts/documentation/shooting/weihrauch-hw100-air-leak.html?utm_source=rss: f6be1e9b37cebd175da80efc6b38a55dbcac95f6
seen https://www.bentasker.co.uk/posts/documentation/shooting/weihrauch-hw100-air-leak.html?utm_source=rss
Traceback (most recent call last):
File "/app/main.py", line 505, in <module>
stats.append(process_feed(feed))
^^^^^^^^^^^^^^^^^^
File "/app/main.py", line 342, in process_feed
page_status = submit_to_linkwarden(entry.link, tags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/main.py", line 166, in submit_to_linkwarden
LINKWARDEN_COLLECTION[1] = get_linkwarden_collection(LINKWARDEN_COLLECTION_NAME)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/main.py", line 105, in get_linkwarden_collection
if name == c['name']:
~^^^^^^^^
TypeError: string indices must be integers, not 'str'
It was working as recently as 5th December.
Activity
27-Dec-25 10:08
Lets take a look at the response
Looks like it's an auth issue
Which is a little odd. The request clearly includes an auth header with a bearer token.
Looking in Linkwarden, the token's not expired:
I created a new one and updated the secret in k8s.
This time, it's run fine
27-Dec-25 10:18
We can obvs improve a bit here by having the code handle the auth failure, but it's not clear why the token suddenly stopped working.
27-Dec-25 10:26
mentioned in commit 62f30b9d7a06eaa0bb2a92beb8c5c85cbdb2f04f
Commit: 62f30b9d7a06eaa0bb2a92beb8c5c85cbdb2f04f Author: B Tasker Date: 2025-12-27T10:22:01.000+00:00Message
fix: add status code handling to collection fetcher (utilities/auto-blog-link-preserver#23)
27-Dec-25 10:31
assigned to @btasker