Elegant Error Handling in Ruby

In this coding exercise you'll learn how to automatically retry a failed process in a Ruby program.

Ruby API Retry

View Video

Summary

Implement a system that automatically retries a failed API call for a pre-determined number of times.

Exercise File

Code File

Exercise Description

Build out the ability for a Ruby method that calls a failing API to retry 3 times, along with storing the error messages in an array.

Real World Usage

Whenever you work with an API it's important to assume that there will be times when the API is down. In this coding exercise you'll learn how to automatically retry an API call after it has failed.

Solution

Can be found on the solutions branch on github.

Jordan Hudgens

Jordan Hudgens

I've been a software engineer for the past decade and have traveled the world building applications and training individuals on a wide variety of topics.


View All Posts