Whilst programming a function which is passed a projects ID or name, I’m using a post command which searches for a project according to the body I’ve written.
The body looks like this:
let body = {
query: {
_or: [
{name: {_like: nameOrId}},
{id: {_eq: nameOrId}}
]
}
}
The following is my call to the API:
await sdk.api().v2.post("/projects/search", body).
Now whenever I pass an ID to the function it works flawlessly but using a name (i.e. “Demo Project”) I receive the error 500 “unexpected server error occurred”.
When there’s only the one of the equal/ like statements no error occurs.
I’m using the following instance: https://api.calponia-beta.bosch.com
All the programming happens in Node.js using the Calponia SDK.
I greatly appreciate any help you can provide