Fast API Tutorial, Part 19: Handling Errors

preview_player
Показать описание
When building an API you'll want to be able to manually handle errors. For example, if a user submits a GET request for a detail view on a specific item and the item does not exist in the database then they'll need to receive a 404 error instead of a generic 400 error included from FastAPI.

In this video you'll get an introduction into how to handle errors in FastAPI.

Рекомендации по теме
Комментарии
Автор

Nice video let alone informativity and sense of author's humor

Hanson-em
Автор

Hi!
at 24:27, and when first using PlainTextResponse I got json response, could it be bc of updates after time?

valett
Автор

Thats a great video! Thank you!
Can I test this with pytest by any chance?

Malbao
Автор

Hi JVP I have a question:
I went through the documentation and when I reached the section of Enum where you can assing predefined values. The class we used inheritted from str and Enum, it only gives str values, what do we do to assign int predefined values, when I used the class int it gives and error, I guess because the parameter given is in str.
Is this the only way: assign the values as str containing numbers like "33" "25" "19" then we use the int() function.

rayanrahmoune
Автор

Who is Sabastian??
You keep refering to him

andrewantwi
join shbcf.ru