January 30 - Using the Retry Method inside of a Ruby Rescue Block
In this coding exercise you'll learn how to automatically retry a failed process in a Ruby program.
Guide Tasks
- Read Tutorial
- Watch Guide Video
- Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license
Already a Bottega Student? Sign In
Summary
Implement a system that automatically retries a failed API call for a pre-determined number of times.
Exercise 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.