Cannot delete multiple posts with the same TSGhostAdminAPI instance

Report a bug (probably in the SDK @ts-ghost/admin-api)

SDK Version:

"@ts-ghost/admin-api": "^4.0.1"

Error message:

    "type": "NotFoundError",
    "message": "Resource not found",
    "context": null

Steps to reproduce:

  1. Create two posts
  2. Then delete them one after the other, using the same TSGhostAdminAPI instance and its API .posts.delete()
  3. Result: the first request will succeed, while the second one will fail with the error above


  1. The error message is misleading. If the post is indeed not there, the error message would be:
    "type": "NotFoundError",
    "message": "Resource not found error, cannot delete post.",
    "context": "Post not found."
  1. If the TSGhostAdminAPI instance is created every time before invoking the .posts.delete() API, then the deletions would succeed. So there is a bug somewhere in the client-side SDK, per my understanding.


For support related to ts-ghost, you’ll probably want to file an issue on their GitHub

Thank you! I had thought @ts-ghost/admin-api SDK was also owned by Ghost. But it seems not.

Issue created: bug: "Resource not found" error when deleting multiple posts with the same TSGhostAdminAPI instance · Issue #213 · PhilDL/ts-ghost · GitHub

1 Like