forked from api-platform/admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: validation errors are shown as "Server communication error" (api…
…-platform#515) * fix: documentLoader() was not loading with method GET When parent function fetchJsonLd() was called with method POST the method is inherited which resulted in a status 415 response from the API which refused the unsafe method with unrecognized Content Type jsonld. * fix: was not displaying a useful error message when creating an entity
- Loading branch information
1 parent
2269cb5
commit 0be3544
Showing
3 changed files
with
33 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import '@testing-library/jest-dom'; | ||
import { TextEncoder } from 'util'; | ||
import { TextEncoder, TextDecoder } from 'util'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { Request } from 'node-fetch'; | ||
|
||
global.TextEncoder = TextEncoder; | ||
global.TextDecoder = TextDecoder as any; | ||
global.Request = Request as any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters