Skip to content
Discussion options

You must be logged in to vote

With FastAPI 0.113.0:

{'detail': [{'type': 'missing', 'loc': ['body', 'attribute'], 'msg': 'Field required', 'input': None}]}
Traceback (most recent call last):
  File "/Users/marcelotryle/dev/encode/starlette/main.py", line 20, in <module>
    assert response.status_code == 200
AssertionError

With FastAPI 0.114.0:

{
│   'detail': [
│   │   {
│   │   │   'type': 'literal_error',
│   │   │   'loc': ['body', 'attribute'],
│   │   │   'msg': "Input should be 'abc' or 'def'",
│   │   │   'input': '',
│   │   │   'ctx': {'expected': "'abc' or 'def'"}
│   │   }
│   ]
}
Traceback (most recent call last):
  File "/Users/marcelotryle/dev/encode/starlette/main.py", line 20, in <module>
    assert r…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Comment options

You must be logged in to vote
2 replies
@Kludex
Comment options

Kludex Sep 22, 2024
Collaborator

@ghost
Comment options

Answer selected by Kludex
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
3 participants