Random 500 errors on API endpoint

Hi Everyone. I am facing random 500 error when I try to editAnActivity.
Basically whenever I try to add a new participant to current participants of an activity, I get random 500 error and the participant is not added.

This is my detailed issue. Please help.