5min chapter

Elixir Mix cover image

Reusable Ecto Code with Mika Kalathil - EMx 164

Elixir Mix

CHAPTER

Ecto-Short Is a Great Example of a Reducable Generator

I'm a big fan of creating error systems in your framework and allowing allowing your system to essentially have errors that you expect so one of the ways that we do that is by having a specific struct that is responsible for an error. I actually open source this as well there's a library that I have called error message which is just literally a wrapper for errors. By wrapping errors it allows you to have predictable errors in your system and so you can have predictable responses and pattern match off like a code for example. The ability to open up a parameter and have it automatically just work is amazing, especially once you start moving into like absent their GraphQL or even your controllers with ectoshorts.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode