Back to all status codes

502

Bad Gateway

Server Error
RFC 7231

The server, while acting as a gateway or proxy, received an invalid response from the upstream server.

Detailed Information

The 502 status code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.

Common Examples

  • API requests with gateway errors
  • Web page requests with gateway errors

Common Uses

  • API requests with gateway errors
  • Web page requests with gateway errors

Best Practices

  • Use when the server received an invalid response from the upstream server
  • Include a detailed error message
  • Ensure proper gateway and proxy configuration

Quick Actions

Category Information

Server Error

The server failed to fulfill an apparently valid request

Available for Freelance

Fullstack developer specializing in React, Next.js, and Node.js. Let's build something amazing together!

Stay in the loop

Get notified about new tools and updates

HTTP Status Codes Reference - Complete List with Descriptions