question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] 422 using a dict body with 0.27.0

See original GitHub issue

The following endpoint was running fine with 0.26.0 and Python 3.6.5:

@app.patch(“/ps/user”) async def patch_user(user_dict: dict, add: List[str] = Query(None)) -> dict: …

but with upgrading to 0.27.0 I got the following 422 error:

{
    "detail": [
        {
            "loc": [
                "query",
                "user_dict"
            ],
            "msg": "field required",
            "type": "value_error.missing"
        }
    ]
}

I can’t find and according change in the last commits so I assume this is a bug?

Thanks, Daniel

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
CanD42commented, Jun 4, 2019

wow, that was fast. It’s working now with 0.27.2 👍 Thanks

0reactions
tiangolocommented, Nov 10, 2022

Yep, it’s an old design decision by Requests 🤷😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

422 Unprocessable Entity - value is not a valid dict when ...
When i put a class having a name variable in argument of the function i keep getting "422 Unprocessable Entity - value is...
Read more >
How To Fix the HTTP 422 Error - Kinsta
Unlike other HTTP errors, the HTTP 422 code will keep reappearing until you manage to troubleshoot the problem. Here's how to fix it....
Read more >
python-benedict - PyPI
python-benedict is a dict subclass with keylist/keypath support, ... Wherever a key is used, it is possible to use also a list (or...
Read more >
Why am I getting a status code of 422 when making a call to ...
The error message is telling you that the search parameter needs to be identified by a q charactger. Try the following:
Read more >
Using dictionaries to store data as key-value pairs
The dictionary stores objects as key-value pairs and can be used to represent complex real-world data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found