Azure / Azure/azure-functions-host
Provide a better error when proxies.json is invalid
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### Investigative information
I have a function that I am trying to use to mock some API.
I kept getting this user facing error:
`Function host is not running.`
Then I decided to create an actual function which would not start which then said that I could not start it.
```
The function runtime is unable to start. Microsoft.Azure.AppService.Proxy.Common: Expression 2561097253 error: body is empty.
Session Id: 9d4e2602fbfa4e34a6bed8794a1c958c
Timestamp: 2018-07-24T23:16:39.491Z
```
#### Repro steps
Create a function. Add a proxy config which is malformed. User facing error should say `Proxy configuration invalid.`
#### Expected behavior
I would expect that the online proxy editor would not allow me to get myself into a bad state where the file is not good. As soon as I make I change, I would expect the editor to tell me, no, this change will not fly.
#### Actual behavior
Cryptic error. `Function host is not running.` ,
`body is empty`
None of these mention that they are failing because the json is malformed or invalid.
#### Related information
https://github.com/Azure/azure-functions-host/issues/2680
Contributor guide
Research direction
No source file or test is named in the issue. Start by reproducing the failure with a malformed proxies.json and trace the proxy configuration handling; done means the user-facing error clearly identifies the configuration as invalid instead of reporting only that the function host is not running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100