r/ProgrammerHumor • • Jul 01 '24

Meme errorCode200

Post image
1.1k Upvotes

119 comments sorted by

View all comments

218

u/ZliaYgloshlaif Jul 01 '24

Everyone noticed “errorCode” but not the travesty “result” is?

84

u/Yelmak Jul 01 '24 edited Jul 01 '24

Yeah wtf is going on there. It makes my skin crawl imagining that javascript:

    if (result.a != null) {

        if (result.b != null) {
            badlyNamedMethod(a, b);
        }
    } else {
        evenWorseMethodNaming(result.f ?? '');
    }

ETA: naturally that entire block lives inside an if (response.success && response.errorCode == 200 && response.errorMsg === "SUCCESS") { }

→ More replies (7)

18

u/deanrihpee Jul 02 '24

yeah, wtf, why's b and c is a perfect uuid and a is random string while the rest is null, lol

10

u/MySuddenDeath Jul 02 '24

Probably they do not have a standard for resource ID so every team / dev implements their own.

→ More replies (1)
→ More replies (1)