This addon is a workaround to unblock Ember upgrade during existed bug in ember-data (from 3.1.2 to 3.12):
"infinite retry bug for failed relationship fetches"
we're actually experiencing this issue with v3.1.2 (which we upgraded to for the fix for #4963). We're aiming to upgrade rapidly soon, but have a few blocking factors that we have to tackle first.
related to:
ember install ember-data-stop-infinite-retry-for-failed-relationship-fetches
Change app/adapters/application.js
:
import DS from 'ember-data';
import { inject as service } from '@ember/service';
export default DS.JSONAPIAdapter.extend({
cacheResponse: service(),
handleResponse(status, headers, payload, requestData) {
// ...
if (status !== 200) {
this.get('cacheResponse').handle([status, payload, requestData]);
}
return this._super(status, headers, payload, requestData);
},
// ...
});
compatible with https://github.com/adopted-ember-addons/active-model-adapter
git clone [email protected]:Mifrill/ember-data-stop-infinite-retry-for-failed-relationship-fetches.git
cd ember-data-stop-infinite-retry-for-failed-relationship-fetches
npm install
yarn lint:js
yarn lint:js -- --fix
ember test
– Runs the test suite on the current Ember versionember test --server
– Runs the test suite in "watch mode"ember try:each
– Runs the test suite against multiple Ember versions
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
This project is licensed under the MIT License.