Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: use standard errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Dec 9, 2019
1 parent 0dfb7d4 commit 0df99cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/ipfsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const log = require('debug')('ipfs')
const mergeOptions = require('merge-options')
const { isTest } = require('ipfs-utils/src/env')
const { ERR_NOT_INITIALIZED } = require('./errors')
const { NotInitializedError } = require('./errors')
const { validate } = require('./config')
const Components = require('./components-ipfsx')
const ApiManager = require('./api-manager')
Expand All @@ -29,7 +29,7 @@ module.exports = async options => {

const apiManager = new ApiManager()
const init = Components.init({ apiManager, print, constructorOptions: options })
const { api } = apiManager.update({ init }, ERR_NOT_INITIALIZED)
const { api } = apiManager.update({ init }, () => { throw new NotInitializedError() })

if (!options.init) {
return api
Expand Down

0 comments on commit 0df99cf

Please sign in to comment.