@Henk de Boer 500 error could happend due to mutiple reasons and I will also suggest you to review Azure Functions diagnostics to find the root cause of the 500 error. Alternative you can also review your application insights logs for your function to know more about the full exception trace/error message that is causing 500 error.
The above should help you to find the root cause but if it you are still facing the issue then you can create the suport ticket with us. If you don't have the support plan then please share your function app in my private comment so I can assist you further.