Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs-inactive/js-ipfs-http-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 840298f19ea0
Choose a base ref
...
head repository: ipfs-inactive/js-ipfs-http-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ba85b3b34e47
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 23, 2015

  1. don't mess with my errors

    daviddias committed Nov 23, 2015

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    70c2e6f View commit details
  2. don't mess with my errors

    daviddias committed Nov 23, 2015
    Copy the full SHA
    ba85b3b View commit details
Showing with 14 additions and 1 deletion.
  1. +3 −0 src/request-api.js
  2. +11 −1 test/api/files.spec.js
3 changes: 3 additions & 0 deletions src/request-api.js
Original file line number Diff line number Diff line change
@@ -35,6 +35,9 @@ function onRes (buffer, cb) {

Wreck.read(res, {json: true}, (err, payload) => {
if (err) {
cb(err)
}
if (payload) {
error.code = payload.Code
error.message = payload.Message
}
12 changes: 11 additions & 1 deletion test/api/files.spec.js
Original file line number Diff line number Diff line change
@@ -66,7 +66,17 @@ describe('.files', function () {
})
})

// -
it('files.stat file that does not exist', function (done) {
this.timeout(20000)

apiClients['a'].files.stat('/test-folder/does-not-exist', function (err, res) {
assert(err)
if (err.code === 0) {
return done()
}
throw err
})
})

it('files.read', function (done) {
this.timeout(20000)