• darvit@lemmy.darvit.nl
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 month ago

    This looks so over-engineered. Most of the time you only need an error message. Make the message clear enough so that it can be shown to the end user.

    • TomasEkeli@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      1 month ago

      Why even use HTTP, when you can just send bytes directly over the physical network card, right?

      Because standards make it better for everyone. You’ve no idea when, who or in what context the error will happen or be received by.

      It takes so little to return ProblemDetails, and improves the experience of devs using your API so much. Just do it. Stop thinking up edge cases and faffing about with excuses. Do it.