Azure / Azure/azure-functions-host

Clarify route prefixes that are not allowed or throw on startup if an invalid route prefix is used.

Open
#5,322 1 comment 0 reactions 0 assignees View on GitHub
supportability supportability: error-message-improvement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

#### What problem would the feature you're requesting solve? Please describe.
There is no notification when a routePrefix is chosen that is not allowed, such as "admin"

#### Describe the solution you'd like
I would like an error message in the log that informs me, the developer, that the given route prefix in the http extension is not allowed to be used and that I need to change it.

#### Describe alternatives you've considered
Failing to compile which may require unknown changes to the sdk infrastructure.

#### Additional context
Currently, the host is happy to report that my function is available at the selected routePrefix and function name, and calling returns a 404 which isn't very helpful to debug a problem.

Contributor guide

Open the contributing guide

Research direction

The issue identifies the HTTP extension's routePrefix setting and the host's startup route reporting as the relevant entry points. Start by tracing how the selected prefix is accepted and how the function route is logged; done means an invalid prefix such as "admin" is rejected at startup or produces a clear log error instead of reporting a callable route that returns 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.