Hey so I was tinkering around with the library and found out the following:
If you try to delete a post right after publishing (like the example does) it works fine, but whenever you use getPostIDfromURL to get the postID and use that, then it doesn't work and it returns a 500 error.