There's just really no excuse for 500s. When a service is throwing 500s, it's nearly always because it was built on the assumption that unlikely equals impossible.

This is the height of RORA: Runs once, run away!

A 500 is an all-hands call. Stop everything, kill it with fire.
The first thing to do: make sure your returns include an error route. It is extremely common to design API's with no other exit on failure than a 500. Gotta stop that immediately, which is likely, unfortunately, to mean re-designing return payloads.
Second step, of course, is to make sure you have an exception handler at the top that *takes* that error route. Third thing is to start turning those exceptions into useful info for your team and your downstream teams.
Frustratingly, a lot of teams getting 500s go try to fix the particular *instance* of the 500 without actually doing the work needed to fix the *family* of "unlikely turned out to not be impossible" bugs it represents.
Service calls are not function calls. When your monolith throws, you can fire it up at the top level, recreate the call, and see what actually happened. Microservices can't do that. Neither our team nor the downstream team can decode a 500 as other than "something happened".
So we hit the logs. Oh, lord help me, do we hit the logs.

It's a lousy way to live.
This is a longstanding take of mine: the transport errors are for errors in the *transport*. Don't overload them with business errors or coding errors that aren't transport.

• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with GeePaw Hill

GeePaw Hill Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @GeePawHill

16 Sep
The ideal team size for software development is five makers.

Note: No one ever asks me this, but I just felt like saying it out loud.
The ideal sprint size is don't have sprints.

Note: No one ever asks me this, either, but I just felt like saying it out loud.
The ideal branching strategy is push to head, pull from head, test at head, ship from head.

You guessed it: Nobody asked me this.
Read 13 tweets
16 Sep
Here's James Booker, "Goodnight Irene".

I meant to play another stunning take of it John Hurt, with his beautiful playing and tenor and his way of projecting kindness across all his work.

But in quest of it, I was reminded of the astonishing life of James Booker.
Classically trained Booker, imagine him, at Angola, black and gay with one great skill, the keyboard. I can't, really, even conceive of it, only guess.
Read 6 tweets
16 Sep
I've been offered a tiny gig, a programming thing, with two months of pay I would normally bill in a few days. And it's not terribly exciting. But it's for a friend. Been stalling on the decision.
He stopped by today, we're neighbors and very old friends, and I asked him what would he think if I did it open source and used it to make video content? I told him that would make me more likely to do it.

He said he thought that would be great.
The part of me that doesn't think the program is very interesting kinda wilted. You know how many people I do work for who would never ever say yes to that kind of proposal?
Read 5 tweets
15 Sep
I am coming to believe that our first steps towards community happen when we start letting go of the idea of the "normal human", for others, of course, but also very much for ourselves.

Acceptance begins at home, it always begins at home.
I wish so much that I had words and stories and art and songs to help more geeks begin this journey. What most worries me about the geek trade is its ferocious appetite for Platonic abstraction, and the way it tends to un-people all the amazing humans and their amazing humanness.
I see so many lovely and talented people out here in the trade, mining the vein of technical geekery. The best of them are *bursting* with geek joy. I wish more of them had the courage -- courage upon courage -- not just to manifest that joy, but to speak to it and of it.
Read 4 tweets
15 Sep
I have just finished a wondeful novel, Richard Powers's _Overstory_. I want to tell someone about it, or, more likely, about me through it.
I am a long-time fan of Powers, and have read all of his work over the years. I didn't know until last week, that he'd written this in 2018. He is a novelist of a very particular kind, combining my kind of scientific dorkiness with a tremendous gift for story.
I started the book yesterday, and finished it a couple of hours ago. It is quite long, and there was about a four-hour sleeping break, but I think it's fair to say I read it in a single sitting, as I've done nothing else since I started it.
Read 12 tweets
11 Sep
Buttressing arguments about the risks & rewards of remote work by analyzing the period from March '20 to the present isn't just anti-science tomfoolery, it's wildly irresponsible, and you need to look into your heart and think about what you're doing.
There arguments, pro and con, legitimate arguments, around remote work. None of them, not one of them, has much of anything to do with work during pandemic, remote, onsite, or otherwise.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!