admin icon indicating copy to clipboard operation
admin copied to clipboard

Error message is not displayed on DELETE error

Open anjeylink opened this issue 4 years ago • 0 comments

API Platform Core version: 2.6.4 API Platform Admin version: 2.6.0

Description
Error message description is not shown if something went wrong while deleting record using dataProvider.

How to reproduce

  1. Delete record using dataProvider.
  2. If error occurs on backend it will try to parse jsonld and issue a request to "/api/context/Error" with method "DELETE". This cause no content to return.
  3. Notification with regular "Bad request" error messages will be shown instead of error description from backend.

Possible Solution
In src/hydra/fetchHydra.js on line 38 replace "DELETE" method with "GET" in authOptions.

anjeylink avatar May 31 '21 09:05 anjeylink