Azure / Azure/azure-functions-durable-python

Calling Signal entity HTTP API fails with content-type=application/json

Open
#346 2 comments 0 reactions 0 assignees View on GitHub
bug fixed-in-v2 P2
Dominant language
Python
Stars
157
Forks
70
Avg merge
2d 10h
Merged PRs (30d)
2

Description

### Context
In the [http api documentation for signalling a durable entity](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api#signal-entity) it is stated that the request content (payload) should be JSON-formatted, implying that the Content-Type should be application/json.
Calling the API using this Content-Type=applicaton/json will throw an error in the get_input() function of the Durable entity context with the error "the JSON object must be str, bytes or bytearray, not dict"

### How to reproduce
Call the API using Content-Type = application/json

### Workaround
Call the API using Content-Type = text/plain

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Signal entity HTTP API handling to the Durable entity context's get_input() function, using the documented signal-entity request and the reported Content-Type behavior as the reproduction. Verify the JSON payload is accepted with application/json, while preserving the existing text/plain workaround behavior, and add or update coverage for both request forms if the surrounding tests provide a suitable entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.