Learn RxJS Error Handling in Angular

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 29

  • @margaritatryfou3910
    @margaritatryfou3910 2 роки тому +4

    Hello Mr Profanis thank you for this nice video. I have one question please. Can you give us 1 or 2 examples where this approach could be useful?

    • @CodeShotsWithProfanis
      @CodeShotsWithProfanis  2 роки тому +3

      Thanks! Glad you liked it! :)
      This approach could be useful:
      - Let's assume the following application requirement. On an HTTP communication, when the response is 5xx we should to display a friendly message to the user. To accomplish this we can handle the error as early as it is possible and if it matches a potential condition we will display the error message (toast, alert, etc). While we are handling the error, we might want to return an empty list, empty object or simply to re-throw the error.
      - Another useful approach is when we want to retry the HTTP call. When we send an HTTP request we might get back a 5xx. There are some cases where we prompt the user to try again. Well, we can programmatically retry the same HTTP call. A combination of the catchError operator and other useful operators could do this trick

    • @margaritatryfou3910
      @margaritatryfou3910 2 роки тому +1

      @@CodeShotsWithProfanis thank you for yor answer! It is crystal clear now

  • @MG-wx8yx
    @MG-wx8yx 7 місяців тому +1

    The best explanation for me. Thank you so much.

  • @Brendan2Alexander
    @Brendan2Alexander 3 місяці тому +1

    Very helpful. Tho was just implementing ThrowError and it is now changed so it has to be like this: ThrowError(()=> err). But otherwise the same

  • @titokris5162
    @titokris5162 2 роки тому +2

    Never disappointing Fanis!!! Thanks a bunch!!!!

  • @iamgld
    @iamgld 2 роки тому +1

    It's a really good video Mr Profanis, awesome job! 🤟

  • @jkevinparker
    @jkevinparker Рік тому

    You explained this very clearly--thank you! This is exactly what I needed.

  • @PantelisPapasavvas
    @PantelisPapasavvas 2 роки тому +1

    Very good explanation
    Have a nice day!!

  • @yuriinadilnyi3029
    @yuriinadilnyi3029 2 роки тому +1

    such clear explanation) thx

  • @rs4267
    @rs4267 Рік тому +1

    Thanks sir !

  • @OlehBiblyi
    @OlehBiblyi 2 роки тому +1

    Great as usual!

  • @roman-tp6sd
    @roman-tp6sd 2 роки тому +1

    What vs code extension use?

    • @CodeShotsWithProfanis
      @CodeShotsWithProfanis  2 роки тому +1

      I have many of them :)
      Which feature did you like the most, so that I can share with you the extension name?

    • @roman-tp6sd
      @roman-tp6sd 2 роки тому

      @@CodeShotsWithProfanisfor example in subscribe object auto complete properties next, error

    • @CodeShotsWithProfanis
      @CodeShotsWithProfanis  2 роки тому +1

      @@roman-tp6sd I think you mean the feature where we see the parameter names of a method.
      If so, you have to add the following line in your settings.json
      "typescript.inlayHints.parameterNames.enabled": "all"

    • @roman-tp6sd
      @roman-tp6sd 2 роки тому +1

      @@CodeShotsWithProfanis yessssssss tnx!!!!

  • @jayakumar2927
    @jayakumar2927 2 роки тому +1

    how to assign data to aray element

  • @risoledoce
    @risoledoce 2 роки тому +1

    I thought your voice was generated by a software
    . lol.