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

Commit e6383cd

Browse files
author
Alan Shaw
committed
fix: use standard errors
1 parent bf275b9 commit e6383cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/ipfsx.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const log = require('debug')('ipfs')
44
const mergeOptions = require('merge-options')
55
const { isTest } = require('ipfs-utils/src/env')
6-
const { ERR_NOT_INITIALIZED } = require('./errors')
6+
const { NotInitializedError } = require('./errors')
77
const { validate } = require('./config')
88
const Components = require('./components-ipfsx')
99
const ApiManager = require('./api-manager')
@@ -29,7 +29,7 @@ module.exports = async options => {
2929

3030
const apiManager = new ApiManager()
3131
const init = Components.init({ apiManager, print, constructorOptions: options })
32-
const { api } = apiManager.update({ init }, ERR_NOT_INITIALIZED)
32+
const { api } = apiManager.update({ init }, () => { throw new NotInitializedError() })
3333

3434
if (!options.init) {
3535
return api

0 commit comments

Comments
 (0)