Backfill script fix: normalized title matching to stop repeat 422 errors on dev.to
A daily unattended publishing pipeline had a flaw where its skip check compared titles exactly, so titles containing × were not recognized as already published after dev.to normalized them to x. This caused re-submissions to fail with a 422 'Title has already been used' error, and one previously published post was incorrectly listed as pending. The author built a normalize_title() function that converts both local and platform titles to the same form before comparing, and tested it on 12 sample titles. Tests showed 4 of 5 same-meaning cases matched correctly, with the only miss being Traditional versus Simplified Chinese, a known limitation. The fix will be integrated into the backfill script with a cooldown safeguard.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in