Intern Track Roadmap

HTTP status codes: server errors (5xx)

This course covers HTTP 5xx status codes, the responses a server sends when it fails to fulfill a valid request. It explains how 5xx differs from 4xx and where errors come from across proxy, app server, application and database layers. Lessons walk through 500, 502, 503 and 504 with causes and debugging steps in a Rails setup with Nginx and Puma. The course also covers timeout chains, maintenance pages, logging levels, error tracking services, health checks, rescue_from, custom error pages and the Rails.error API.

What you'll learn

  • ✓How 5xx errors differ from 4xx errors and which infrastructure layer returns each code
  • ✓Common causes of 500 errors in Rails and how to map exceptions to the correct status code
  • ✓How to debug 502 and 504 errors using Nginx, Puma, Rails and database logs
  • ✓Using 503 with the Retry-After header and serving maintenance pages
  • ✓Configuring timeouts in descending order across Nginx, rack-timeout and PostgreSQL
  • ✓Logging, error tracking, alerting and error handling with rescue_from and Rails.error
Free preview · Lesson 1 4 min read

What are server error status codes?

Imagine you walk into a restaurant and place your order perfectly: correct item, correct table, valid payment. But then the kitchen catches fire. That's not your fault as a customer; the restaurant can't fulfill your request right now.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...