SShortSingh.
Back to feed

DEV.to API omits 'published' field from single-article endpoint, breaking publish checks

0
·2 views

Developers scripting posts to DEV.to who rely on the single-article endpoint GET /api/articles/{id} to confirm a post is live will find the 'published' field is entirely absent from the response, not simply false or null. This means article.get('published') silently returns None, causing scripts to misidentify live articles as drafts and potentially trigger unwanted retries. The omission is consistent regardless of whether an API key is supplied, ruling out a permissions issue. The author-scoped endpoint GET /api/articles/me/published does return the 'published' field correctly, making it the right choice when distinguishing drafts from published posts. The most reliable publish confirmation is an unauthenticated GET request to the single-article endpoint — an HTTP 200 response confirms public visibility, while drafts and nonexistent articles both return 404.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Developer Walks Through Pushing a First GitHub Project via Git and SSH

A new developer at Lux Dev documented their first experience setting up a local project and pushing it to GitHub entirely through the command line. The project, a Kenya hospital health records analysis, began as an empty desktop folder before being structured with subdirectories and a README file built using terminal commands. Git was initialized locally, files were staged and committed, and the repository was then linked to a new GitHub remote. SSH authentication was verified before the final push, confirming secure access to the account. The walkthrough covers the foundational Git workflow, from folder creation and staging to committing and pushing with upstream tracking.

0
ProgrammingDEV Community ·

Developer's crash reporter crashed his app before a single line of his code ran

A solo developer adding Sentry error reporting to his Android workout app WhyRep found the app crashing 100% of the time on launch after installation. Despite carefully gating the Sentry SDK behind a DSN check in his Application class, the app died before that code ever executed. The root cause was a ContentProvider auto-injected into the Android manifest by the Sentry SDK itself, which initializes Sentry before the Application class runs. Since no DSN was set in the manifest metadata — the developer stored it in a gitignored local.properties file — Sentry threw an exception during process startup. The fix required just one line to disable Sentry's auto-initialization via the manifest.

0
ProgrammingDEV Community ·

Developer cuts app query time 17x by adding indices, then finds three more bugs via Sentry

A developer building WhyRep, a workout-tracking app that derives coaching verdicts from raw training logs on every read, discovered severe performance issues during a code review on July 25, 2026. Eleven Room database entities had no indices, causing full table scans on the largest table in the schema and pushing session load times to 119.1 ms — a problem that worsened the longer a user stayed active. Adding database indices slashed that figure to 6.8 ms, a 17.4x improvement, while three other bugs were also fixed, including redundant single-row writes and unnecessary full catalog loads on every app launch. After the performance work was complete, the developer integrated Sentry for observability and uncovered three additional previously unknown bugs, including one where Sentry itself had been silently discarding every submitted trace. The project had previously operated with no error reporting or performance monitoring of any kind, leaving issues invisible in production.

0
ProgrammingDEV Community ·

TrustGateway Ships 36 Test Vectors and Evidence-Carrying Receipts for ATC v3 Verification

A developer update addressed a community question about test fixture and trust response sequencing, confirming both have now been released. A total of 36 test vectors — covering positive, negative, mutation, and cross-language cases — have been committed to the project's GitHub repository under the vectors/ directory. A Python verifier using the cryptography library runs all applicable vectors and currently passes 29 out of 29 checks, including a nested-object tamper test targeting subject.agent_id. The TrustGateway now generates a signed ActionReceipt for every ALLOW decision, containing argument and evidence hashes, verification stages, a trust score, and an Ed25519 signature, allowing callers to independently replay and audit policy decisions. Receipts are also chained into a Merkle audit log with a signed root, making any retroactive tampering detectable.