o-development / ldo

Monorepo for Linked Data Objects (ldo)
MIT License
23 stars 5 forks source link

createIfAbsent and createAndOverwrite return success after a 404 #35

Open pchampin opened 2 months ago

pchampin commented 2 months ago

Consider the following code:

getResource("http://localhost:8000/mypod/fake-folder/new-resource")
  .createIfAbsent()
  .then(result => console.log(result.isError));

If fake-folder does not exist, the POST request gets a 404, but the result has isError false and type "createSuccess"! The same behavior occurs with createAndOverwrite.