Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled rejection ReadError: get() requires key and callback arguments #84

Closed
harryparkdotio opened this issue Oct 27, 2017 · 3 comments

Comments

@harryparkdotio
Copy link

Unhandled rejection ReadError: get() requires key and callback arguments
    at readError (~/Development/git/tapedeck/node_modules/LinvoDB3/node_modules/levelup/lib/levelup.js:175:21)
    at LevelUP.get (~/Development/git/tapedeck/node_modules/LinvoDB3/node_modules/levelup/lib/levelup.js:187:12)
    at Function.Cursor.retriever (~/Development/git/tapedeck/node_modules/LinvoDB3/lib/cursor.js:355:17)
    at ~/Development/git/tapedeck/node_modules/LinvoDB3/lib/cursor.js:332:16
    at Timeout._onTimeout (~/Development/git/tapedeck/node_modules/LinvoDB3/node_modules/bagpipe/lib/bagpipe.js:157:34)
    at ontimeout (timers.js:469:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)

This is the error returned when trying to find documents; Track.find({}, (err, docs) => { console.log(err, docs)});


import LinvoDB from 'LinvoDB3';

LinvoDB.defaults.store = { db: require('leveldown') };
LinvoDB.dbPath = '/Users/harryparkdotio/Desktop';

const Track = new LinvoDB('tracks', {
	artistId: String,
	artist: String,
	albumId: String,
	album: String,
	title: String,
	duration: String,
	no: String,
	format: String,
	bitrate: Number,
	releaseID: String,
	path: String
});
@harryparkdotio
Copy link
Author

I was putting promises into the db by accident.

@Ivshti
Copy link
Owner

Ivshti commented Oct 28, 2017

Lol :) Well thanks for the update!

@harryparkdotio
Copy link
Author

Could this be something that is better taken care of? Say, throw a specific error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants