CarbonLDP / carbonldp-js-sdk

Carbon LDP JavaScript SDK
Other
6 stars 4 forks source link

Modifying a property with a schema and a different type causes an internal server error #357

Open Yahaire opened 5 years ago

Yahaire commented 5 years ago

I was getting a 500 error when trying to edit a property of a document. The property's original value was a string, and the value I was assigning it was an empty array.

When I tried to save the modified document, the request would fail with a 500 error.

The reason why I was assigning an empty array to the property was that, sometimes, there are multiple strings that come back from that property, and I needed to empty that array before adding different values.

roddolf commented 5 years ago

Couldn't replicate. We need more information.

Yahaire commented 5 years ago

Sorry, what other information may I provide?

roddolf commented 5 years ago

Can you provide us with the Request data? (you can hide any sensitive data with **)

The 500 error sounds that likely it's not sending a body, where it shouldn't be the case if the original value is a string. It should be sending a DELETE of that string.