The error that succeeded: HTTP 500 that created the article
Description and use
An automated script publishing to dev.to received an HTTP 500 but the article was created. Subsequent retries caused duplicates. The fix was to verify article existence after any 5xx response to avoid re‑posting.
Problem
Automated article publishing scripts misinterpret HTTP 500 responses as failures, leading to duplicate posts when the server actually succeeded in creating the article.
Outcome
By checking for existing articles after a 5xx response, the automation avoided duplicate posts and handled server inconsistencies.
Workflow
- POST /api/articles to publish note
- Receive HTTP 500 and treat as failure
- Retry POST with backoff
- Receive HTTP 422 on duplicate canonical
- Verify article existence via GET /api/articles/me
- Confirm article ID and canonical
- Skip further retries
Evidence
The article existed.
HTTP 500 — twice across attempts — script treated it as failure
HTTP 422 — "Canonical url has already been taken"
- Record date: 2026-09-07T01:21:38.461Z