nodeSolidServer / nodeSolidServer/node-solid-server
Deletion of decimals fail with a 409
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
When I write the following data to my Pod:
@prefix : <#>.
@prefix schem: <http://schema.org/>.
:160581889284507796464006133086
a schem:MonetaryAmount; schem:amount 1.0; schem:currency "USD".
Written using the following request:
curl 'https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl' -X PATCH -H 'Content-Type: application/sparql-update' --data-raw $' INSERT DATA {<https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086> a <http://schema.org/MonetaryAmount>;\n <http://schema.org/currency> "USD";\n <http://schema.org/amount> "1"^^<http://www.w3.org/2001/XMLSchema#decimal>.\n};'
As far as I can tell I should be able to delete that data with the following PATCH:
DELETE DATA {<https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086> a <http://schema.org/MonetaryAmount>;
<http://schema.org/amount> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal>;
<http://schema.org/currency> "USD".};
However, that results in the following response:
The patch could not be applied. Could not find to delete: https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086 http://schema.org/amount "1.0"^^http://www.w3.org/2001/XMLSchema#decimal .
This appears to happen specifically with decimals. (Though it seems to be the problem has a similar root cause to https://github.com/solid/node-solid-server/issues/1468, but for decimals rather than booleans.)
See this sandbox for the reproduction (log in with a solidcommunity.net account): https://codesandbox.io/s/floral-glitter-jfejz?file=/src/index.ts
(Originally reported by @abigpotostew against Tripledoc.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the decimal DELETE DATA failure with the curl requests in the issue and compare it with the preceding INSERT DATA request. Trace the server's PATCH handling for decimal RDF terms; done means deleting the stored "1"^^xsd:decimal succeeds when the request uses the equivalent "1.0"^^xsd:decimal value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100