Today's summary thread! @ElixirOutlaws with @Adkron, and @ChrisKeathley. Episode 101: Bright and Tight.

open.spotify.com/episode/6YW6Qb…

This episode was packed with information on handling errors in Elixir.

#elixirstatus #elixirnewbie

🧵0/10
Error handling can be tricky, and can cause a task you would expect to take a single day to instead take a whole week!

1/10
This episode is focused on dealing with errors caused by working with external services. Anytime you're dealing with external dependency, you expose yourself to risk.

2/10
You risk that the service might be down. You risk that the service may change. The number of potential errors is grand and unknowable.

3/10
So how do you handle the specific errors you care about while also dealing with errors you don't care about specifically?

4/10
It starts with observability and monitoring. Monitoring which errors occur in your production application lets you know when your users encounter bugs in real-time and when you aren't handling a specific error gracefully.

5/10
To deal with errors called by making requests to an external service, consider isolating the entire API call in its own process that can handle raising the error. This links the lifecycle of the web request (your LiveView) and the lifecycle of the external API call.

6/10
Upon raising an exception in the process, you can have another process acting as a supervisor to monitor the crash of the original process. This is your "work coordinator" who can handle tracking how often a process is failing (halting it if needed)

7/10
The benefit of this approach is that you isolate errors to allow them to blow up safely, but you can also specifically handle errors you care about. You take a holistic approach to writing errors which leads to less code dedicated to error handling.

8/10
This leads to easier-to-use APIs for your end-user. They don't have to write code to handle a plethora of errors either.

9/10
Hope you enjoyed today's summary! I do not represent @ElixirOutlaws - I just summarize information for fun and to learn.

For their full opinions, see the original episode: open.spotify.com/episode/6YW6Qb…

10/10

• • •

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

Keep Current with Brooklin Myers

Brooklin Myers 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!

PDF

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 @BrooklinJMyers

16 Sep
Todays summary: Watched @lawik's LiveStream: Video: Nerves, Livebook & small displays (eInk, OLED)
underjord.io/livestream-ner…

How @NervesProject helps you get started with Elixir and IoT without needing to know a lot about the hardware.

🧵0/13

#myelixirstatus #elixirnewbie
Raspberry pi is a great way to get your start in IoT, and Nerves and Livebook take that even further. Cool enough: the first real Elixir code Lars wrote was for the Rasberry Pi Zero.

1/13
You can sandwich a Rasberry Pi and an eInk display together. The Rasberry Pi runs your application and your application can use The Libraries Inky and Chisel to write to the display.

2/13
Read 14 tweets
15 Sep
Listened to @ThinkingElixir with @cadebward @bernheisel and @brainlid and guest @voltonez

OTP Certificates Woes with Bram Verburg. spoti.fi/3luRtVs

On September 30, 2021, the root CA certificate DST Root CA X3 will expire. Here's how you stay safe. 🧵

#myelixirstatus
Bottom line, before the end of September, if you are on Elixir OTP 23 or 24 you should upgrade to the latest patch.

specifically OTP 23.3.4.5 or OTP 24.0.4
If you are on an OTP version older than 23, the good news is you will be unaffected so long as you do not upgrade your dependencies. You can freeze your dependencies in order to buy yourself time to upgrade to OTP 23 or 24.
Read 5 tweets
13 Sep
Listened to @BeamRadio1 Episode 18: Code Heresy with Chris Keathley.

Today's panel: @lawik @akoutmos @_StevenNunez @redrapids, @sm_debenedetto, and special guest @ChrisKeathley.

Summarizing some interesting and controversial opinions today 🧵 0/24

#myelixirstatus #elixirnewbie
By far the most loved library on the Panel today was Telemetry. Telemetry powers monitoring and observability in elixir projects and provides a consistent interface to do so. Other mentions were OTP, Livebook, and site_encrypt.

1/24
When members of today's panel came into the Elixir Industry, they found opinions they like and trust from the Elixir community but also questioned established norms. Thus today's topic: Code Heresy.

2/24
Read 25 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!

:(