Azure / Azure/azure-functions-core-tools

Azure function "currently unable to handle this request" when request URL includes 'code' request parameter

Open
#2,454 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

Sorry to add this issue here - I realise a question about infrastructure probably doesn't belong here. I've also posted to https://docs.microsoft.com/en-us/answers/questions/278469/azure-functions-can-i-use-an-http-request-paramete.html
but i'm struggling to find clear documentation behind the Azure function behaviour i'm seeing when deployed to Azure.

Steps to reproduce,
1. create a new function e.g. `func new --template 'HTTP trigger' --name xyz`
2. deploy to Azure static web apps
3. access the Azure Function from the deployed target location, e.g. `https://orange-moss-04231ae03.azurestaticapps.net/api/xyz?name=bob`
4. amend the request to `https://orange-moss-04231ae03.azurestaticapps.net/api/xyz?code=bob`
The request in step 4 results in,
```
This page isn’t working
orange-moss-04231ae03.azurestaticapps.net is currently unable to handle this request.
HTTP ERROR 500
```
Is the above behaviour down to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=csharp#authorization-keys? How can i work around that? (I want to use the Function to handle a redirect from an oauth2/authorize endpoint, which uses `code` to supply the authorization code to the redirect handling endpoint).

thanks

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the HTTP trigger deployment described with the `name` and `code` query parameters on Azure Static Web Apps. Read the linked HTTP trigger authorization-keys documentation and compare its behavior with the Azure Functions deployment; done would be a confirmed explanation or documented workaround, but no repository file or test is named.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.