In my case I got the id from a FormData object in which I had to first stringify it, but forgot to parse it and the string also contained double quotes.