Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

client.post Error: Request failed with status code 400 #246

Closed
cct-tiecheng-zhang opened this issue Feb 10, 2023 · 1 comment
Closed

client.post Error: Request failed with status code 400 #246

cct-tiecheng-zhang opened this issue Feb 10, 2023 · 1 comment

Comments

@cct-tiecheng-zhang
Copy link

version2.2.1

![image](https://user-images.githubusercontent.com/114975771/218062466-9bf65c2c-94ba-4bf7-8c26-c7453b517cc6.png)
@cct-tiecheng-zhang
Copy link
Author

const client = create({
axiosConfig: { baseURL: process.env.API_POSTGREST_URL }
});
const { data } = await client.post("/m_works", { "col1": "value1", "col2": "value2" }, {return: "representation"});

Error: Request failed with status code 400
at createError (D:\powerx-mes-app-backend\node_modules\postgrester\node_modules\axios\lib\core\createError.js:16:15)
at settle (D:\powerx-mes-app-backend\node_modules\postgrester\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (D:\powerx-mes-app-backend\node_modules\postgrester\node_modules\axios\lib\adapters\http.js:312:11)
at IncomingMessage.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant