bookwormstory.social
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 3 months ago

REST my ass 💩

eviltoast.org

message-square
19
link
fedilink
4

REST my ass 💩

eviltoast.org

orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 3 months ago
message-square
19
link
fedilink
alert-triangle
You must log in or # to comment.
  • VeryFrugal@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    3 months ago
    { "ok": false }
    
    • spizzat2@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      3 months ago
      { "ok": false }
      

      - My Chemical Romance

      • meekah@gehirneimer.de
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        wouldn’t that be more like

        new Promise(() =>{
            return { "ok": false };
        })
        
    • PoolloverNathan@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      { "ok": "false" }

  • TomasEkeli@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    Please, please, please, PLEASE return error-codes and problem-details.

    Here’s the RFC: https://www.rfc-editor.org/rfc/rfc9457.html

    • HugeNerd@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

    • ryannathans@aussie.zone
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      It’s often valid to serve a 200 OK with an error in the application data.

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

        Valid, but dumb.

    • darvit@lemmy.darvit.nl
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      3 months 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
        ·
        3 months 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.

    • douglasg14b@lemmy.world
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      3 months ago

      Counter argument is that error codes and problem details can be used by attackers to reverse engineer and find exploitable parts of a system.

      Within reason anyways

      • Feathercrown@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        So can a 200 response with an error description

  • reboot6675@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    Been having similar case with dev teams who have coded every error to be 500. User typed the wrong URL? 500. User tried to access a page without logging in? 500… Makes detecting real errors a pain

  • neuracnu@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

  • Rose@slrpnk.net
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Aaagh! Getting some random old person flashbacks.

    Kids. I r-remember a day… You won’t believe this… I got a 404 error page… It was otherwise a normal 404 page with a normal message on it, but it had a giant ad on it… like “while you’re here, how about you buy this stuff”… It was hell… You’ve got no idea how lucky you kids are with uBlock…

    • The Ramen Dutchman@ttrpg.network
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      I was going to say that sounds like situation normal by the 2020s… Until you said uBlock.

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    error = true with no description or answer is basically ten years of searching stackoverflow and reddit threads for an answer.

    • wetbeardhairs@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      Or a link to a thread on microsoft answers that 404s

      • katy ✨@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        that’s the worst due to how microsoft answers redirects work making it impossible to go back to the previous page.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 776 users / day
  • 4.94K users / week
  • 9.15K users / month
  • 17.5K users / 6 months
  • 3 local subscribers
  • 27.7K subscribers
  • 1.92K Posts
  • 65.9K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org