nazirov91 / ra-strapi-rest

React Admin data provider for Strapi.js
125 stars 40 forks source link

The dataProvider threw an error. It should return a rejected Promise instead. #30

Closed PvtAnimalMother closed 3 years ago

PvtAnimalMother commented 3 years ago

Hi! I am trying to load images following the instructions from readme.md And when I pass field name to the data provider I am getting the following error: Unhandled Rejection (Error): The dataProvider threw an error. It should return a rejected Promise instead. error

// /api/dish/models/dish.settings.json ... "image": { "model": "file", "via": "related", "allowedTypes": [ "images" ], "plugin": "upload", "required": false, "pluginOptions": {} }, ... model_settings

in App.js: const uploadFields = ["image"]; const dataProvider = simpleRestProvider(baseUrl, uploadFields);

app js