Error Handling (How to create Custom Error Handlers and Exceptions) - FastAPI Beyond CRUD (Part 16)

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 17

  • @SsaliJonathan
    @SsaliJonathan  2 месяца назад +1

    Hi everyone,
    In case you are wondering about the changes that were skipped, all of those can be found in Chapter 11 on the course website:
    jod35.github.io/fastapi-beyond-crud-docs/site/chapter11/
    This chapter is also available here:
    jod35.github.io/fastapi-beyond-crud-docs/site/chapter12/
    Thanks for watching!

  • @TalhaKhan-ne1dk
    @TalhaKhan-ne1dk 2 месяца назад

    This video is amazing.
    Thank you for this type of explanation.
    By the way, I have seen your reflex video.
    I have a question ,,,
    I want to use Django with reflex, can I do it?
    It will be helpful if you make a video on it,😇
    Thank you.

    • @SsaliJonathan
      @SsaliJonathan  2 месяца назад

      I think using Django with Reflex will be a bit painful since Reflex has a backend in FastAPI you can use for that. I want to create a series on that topic shotly after this series.

  • @raymondmichael4987
    @raymondmichael4987 2 месяца назад

    such detailed information, thanks buddy.
    Greetings from Tanzania 🇹🇿

  • @kenchak8356
    @kenchak8356 2 месяца назад

    Can we change the content of "initial_detail" on different situations by the input parameter when we raise the same error class? e.g.:
    error_messages = {"error_code": "ER123456", "message": "XXX...", "solution": "YYY..."}
    raise ErrorClass(initial_detail = error_messages)

    • @SsaliJonathan
      @SsaliJonathan  2 месяца назад

      Sure, you’ll have to do that inside the create_error_handler function

    • @kenchak8356
      @kenchak8356 2 месяца назад

      @@SsaliJonathan I got it, thank you

  • @emmanuelalder9052
    @emmanuelalder9052 2 месяца назад

    Another great video. Thanks for sharing your knowledge and talent

    • @SsaliJonathan
      @SsaliJonathan  2 месяца назад

      I appreciate that! Thanks for watching

  • @kenchak8356
    @kenchak8356 2 месяца назад

    Can we customize the error handling for the Pydantic Errors? such like this
    {
    "detail": [
    {
    "type": "less_than_equal",
    "loc": [
    "body",
    "rating"
    ],
    "msg": "Input should be less than or equal to 5",
    "input": 10,
    "ctx": {
    "le": 5
    }
    }
    ]
    }

    • @SsaliJonathan
      @SsaliJonathan  2 месяца назад

      Sure! You can customize the RequestValidationError class.

  • @suen-tech
    @suen-tech 2 месяца назад

    Another greate video.
    Thank you my freind

  • @raymondmichael4987
    @raymondmichael4987 2 месяца назад

    hopefully, you’ll cover testing too and how to automate the process if possible, even one or two videos 😊

    • @SsaliJonathan
      @SsaliJonathan  2 месяца назад +1

      That's the plan! I have a very good video in stock for you. Stay alert.

    • @raymondmichael4987
      @raymondmichael4987 2 месяца назад

      @@SsaliJonathan thanks buddy;
      i’m hooked 😊