Change in User control not saving

I created a plugin using Sensor monitor sample. After editing some property of a sensor, and if I try to save, sometimes it is not saving. I got one exception like follows in log

InnerException:RestApiMIPException:PUT Unexpected statuscode BadRequest in 'http://desktop-mid9fo7/API/rest/v1/mipItems/6fea9082-f7ac-4075-a0e6-ec944ce6b1e0’ - The MIP item could not be saved. at VideoOS.Platform.Proxy.RestApi.RestApiClient.PutRequest(String url, String body)

at VideoOS.Platform.Proxy.RestApi.RestApiClient.Put(String resourceType, String id, String json)

at VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.CallWithRetry[TResult](Func`2 call)

at VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.SetItem(ConfigurationItem item)

at VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiItemWrapper.Save()

Please clarify, sometimes it is not saving, that also means that sometimes it is saving? Intermittent error? If you can detect a pattern, find the difference between the times it does save and the times it fails it would be a big step.

As a first step please look into the API Gateway logs, are there any errors? ([C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) API Gateway\Logs)

Please run the Sensor Monitor sample unmodified and see if you get the same exception then.