# 50405: Routing layer timed out Identifier: `routing_layer_timed_out` Ably's routing layer did not receive a response from the service handling the request within the time allowed, so the request was abandoned. The condition is usually transient. ## What you should do Usually nothing: Ably SDKs retry this automatically, switching to a [fallback endpoint](https://ably.com/docs/platform/architecture/edge-network.md#fallback-endpoints) if it keeps happening. If you call the [REST API](https://ably.com/docs/api/rest-api.md) directly, retry after a short delay, increasing the delay if it recurs. A timed-out publish may still have been processed, but Ably SDKs make REST publishes [idempotent](https://ably.com/docs/platform/architecture/idempotency.md) by default, so their retries cannot duplicate a message. To get the same guarantee when publishing over the REST API directly, set an ID on the message. ## Why it happens The service was slow to respond, typically because it was under load or the operation itself was slow to complete. ## What you'll see The error is reported with code 50405 and HTTP status 504. The message is `Ably's routing layer was unable to service this request (gateway timeout)`, ending with the request ID (`reqID`).