Azure / Azure/azure-functions-python-library

Support HTTPStatus IntEnum for status code return values.

Open
#163 3 comments 0 reactions 1 assignee Claimed by @ramya894 View on GitHub
Dominant language
Python
Stars
179
Forks
79
Avg merge
2d 8h
Merged PRs (30d)
2

Description

I wound up using the `HTTPStatus` IntEnum for a status code in my `func.HttpResponse` returns but noticed the actual web response I was getting was always 200, even when doing something like `status_code=HTTPStatus.BAD_REQUEST`.

Just to verify, I did confirm that returning `int(HTTPStatus.BAD_REQUEST)` on my side of things seemed to fix. So maybe this is addressable in the azure-functions-python-library code (not even sure if it is a worker thing in the first place).

Minor, but it would be convenient to be able to use HTTPStatus. Thought I'd suggest the enhancement since it caused me some head scratching to figure out why I was getting 200's that didn't make sense and it should be an easy tweak.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.