Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create api fails without descriptive error #115

Open
andrewschmidt-a opened this issue Aug 2, 2022 · 1 comment
Open

Create api fails without descriptive error #115

andrewschmidt-a opened this issue Aug 2, 2022 · 1 comment

Comments

@andrewschmidt-a
Copy link

curl --request PUT
--url https://{{HOST}}/ws/rest/com.axelor.contact.db.Contact
--header 'Accept: application/json'
--header 'Content-Type: application/json'
--header 'Cookie: JSESSIONID={{SESSIONID}}'
--data '{
"data": {
"firstName": "John",
"lastName": "Smith2",
"email": "[email protected]"
}
}'

is causing an error of
{
"status": -1,
"data": {
"popup": true,
"title": "Internal Server Error",
"message": "com.axelor.contact.db.Contact"
}
}

How am I supposed to debug this error without more details?

@andrewschmidt-a
Copy link
Author

Appears that the object in the docs does not exist in a production? I cant find contact (maybe I havent installed the right package....)

Anyhow a follow up is that posting an empty object does not work
curl --request PUT
--url https://{{HOST}}/ws/rest/com.axelor.apps.hr.db.Employee
--header 'Accept: application/json'
--header 'Content-Type: application/json'
--header 'Cookie: JSESSIONID='
--data '{
"data": {}
}'

but adding a non existant property will pass
curl --request PUT
--url https://{{HOST}}/ws/rest/com.axelor.apps.hr.db.Employee
--header 'Accept: application/json'
--header 'Content-Type: application/json'
--header 'Cookie: JSESSIONID='
--data '{
"data": { "_________" : "" }
}'

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

No branches or pull requests

1 participant