nodeSolidServer / nodeSolidServer/node-solid-server
Fetch 204 resulted in error
Open
@jaxoncreed is already working on this.
Since Jun 19, 2019.
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
I got 204 No Content when GET a URI which does not exist, and I want to create it if it does not exist depends on res.status, but following code:
solidAuthClient
.fetch(uri)
.then(async (res: Response) => {
// might be 401 for /private , 403 for ACL blocking , 404 for uncreated, 200 for good
console.error('getTWContainersOnPOD() get it', uri, res.status);
return { status: res.status, uri, text: await res.text() };
})
.catch(error => {
console.error('getTWContainersOnPOD() containerTtlFiles', uri, error);
})
only resulted in
getTWContainersOnPOD() containerTtlFiles https://linonetwo.solid.authing.cn/public/tiddlywiki/main TypeError: Failed to fetch
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.
Assessment
This issue has not been assessed yet.