what is the full (absolute) url when the following method is called:
fetch('/api/getName?game=slug')
Does it really point to function app url? Also did you try to trigger it from Azure portal (Function app > Functions > {functionName} > Code + Test > Test/Run)?