ember-data-factory-guy icon indicating copy to clipboard operation
ember-data-factory-guy copied to clipboard

Remove references to `AdapterFetch`

Open patocallaghan opened this issue 3 years ago • 2 comments

Part of https://github.com/adopted-ember-addons/ember-data-factory-guy/issues/444

Fixes deprecate-fetch-ember-data-support deprecations

patocallaghan avatar Feb 15 '22 20:02 patocallaghan

All DRFSerializer (Django Rest Adapter) tests are currently failing 🔴

patocallaghan avatar Feb 16 '22 10:02 patocallaghan

Seems the specific tests that are failing are DRF tests that are checking the error payload - any test that has the line reason.errors[0] has an issue (errors is not defined), eg https://github.com/adopted-ember-addons/ember-data-factory-guy/blob/1d6cd99d8852e826060d6fd2bbfd6354eed93e9a/tests/unit/shared-adapter-behaviour.js#L81

It's failing to generate the correct error payloads, instead it's throwing an actual error in the django adapter - traced it back to this line

https://github.com/dustinfarris/ember-django-adapter/blob/32035bb13d57cb8896bdf1eda560d027e76b6760/addon/adapters/drf.js#LL108C4-L108C60

with fetch adapter: payload = "Not Found" without fetch adapter: payload = null

It seems the FetchAdapter parses the fetch response for errors slightly different than the RestAdapter that the DjangoAdapter uses

From there I get a bit out of my depth, but I hope that helps you out

Techn1x avatar Dec 03 '22 02:12 Techn1x