Closed oscarni closed 7 years ago
My referenced PR updates this. Please consider it :)
Yeah this is kind of unexpected behavior. If you don't want to resolve results then perhaps consider updating the read me with example code on how to handle the rejected promise.
Newbies might be tripped up by this. 😄
When using Sentry this localstorage adapter reports an error every time a query result is empty. How about resolving no results instead of rejecting the promise?
In my usecase an empty response is desired if the query in question returns an empty result, it's not an error.
Here is the rejection: https://github.com/locks/ember-localstorage-adapter/blob/master/addon/adapters/ls-adapter.js#L115
How about resolving it like it's done here: https://github.com/locks/ember-localstorage-adapter/blob/master/addon/adapters/ls-adapter.js#L90