Hei,
I am using cloud.squidex.io to test our javascript client, squidex-client-manager. This was working fine for all requests but when I was running our integration tests noticed it started failing with the error below. The weird thing is that it only happens when creating content. Reading content works fine. I thought maybe it was a bug in our client first so tried going back in history (using git checkout) but could reproduce this consistently. When I switch to our hosted version the error does not occur at all, so seems to be something with cloud.squidex.io
Error
(node:23725) UnhandledPromiseRejectionWarning: Error: Unsupported Media Type
at /Users/scanf/src/github.com/scanf/squidex-client-manager/node_modules/swagger-client/dist/index.js:1:8719
at tryCatch (/Users/scanf/src/github.com/scanf/squidex-client-manager/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/scanf/src/github.com/scanf/squidex-client-manager/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/Users/scanf/src/github.com/scanf/squidex-client-manager/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/Users/scanf/src/github.com/scanf/squidex-client-manager/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/scanf/src/github.com/scanf/squidex-client-manager/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Reproduce steps
Schema setup
- Create a blog sample project
- Clone the posts example and rename it to articles
The code
git clone https://github.com/scanf/squidex-client-manager
cd squidex-client-manager/
yarn
# Create .env file before running the tests
yarn run test
Env example file
SQUIDEX_CLIENT_SECRET=<secret>
SQUIDEX_CONNECT_URL=https://cloud.squidex.io
SQUIDEX_CLIENT_ID=<clientId>
APP_NAME=<appName>