Could it be, if you formulate your question too generic while requesting to modify already existing code ChatGPT might get confused or was this InternalServerError just a common hick up? Reformulating solved it with the expected result.