funkensturm / ember-local-storage

The addon provides a storageFor computed property that returns a proxy and persists the changes to localStorage or sessionStorage. It ships with an ember-data adapter.
https://www.funkensturm.com/ember-local-storage/
MIT License
218 stars 76 forks source link

Handle not found errors #230

Closed bendemboski closed 7 years ago

bendemboski commented 7 years ago

If the record being requested isn't present, return a not found error. The previous behavior was to return a successful response from ajax(), but with an empty payload, which would cause the store to throw an exception. This way an exception is still thrown, but it's an AdapterError, so should fit better with application logic handling such errors.

fsmanuel commented 7 years ago

@bendemboski Thanks for that! I'll merge it even with the failing tests (just deprecations). The next major version will support ember starting from LTS-2.4 as you suggested.

bendemboski commented 7 years ago

Oh, I didn't actually mean to make that suggestion, that was just me being sloppy and committing a file I didn't mean to! I just updated the PR to not have that change.

fsmanuel commented 7 years ago

So I'll wait for the tests. Anyway I'll drop support for old versions.

fsmanuel commented 7 years ago

@bendemboski I released 1.3.5

bendemboski commented 7 years ago

Fantastic, thanks!