Internal Server Error (server_error)
Quick Fix & Resolution
Retry the request with exponential backoff. On pubnet.stellarchain.io, Caddy automatically fails over between FRA1 and NYC3 on 5xx errors.
Response Payload & SDK Handling
json
{
"type": "https://orion.stellarchain.io/horizon-errors/server_error",
"title": "Internal Server Error",
"status": 500,
"detail": "An error occurred while processing this request. This is usually due to a bug within the server software. Trying this request again may succeed if the bug is transient. Otherwise, please contact the system administrator."
}typescript
import { Horizon } from '@stellar/stellar-sdk';
const server = new Horizon.Server('https://pubnet.stellarchain.io');
try {
const res = await server.ledgers().limit(10).call();
} catch (err: any) {
const problem = err?.response?.data;
if (problem?.type === 'https://orion.stellarchain.io/horizon-errors/server_error') {
console.error('[server_error] HTTP 500:', problem.detail, problem.extras);
}
}go
client := &horizonclient.Client{
HorizonURL: "https://pubnet.stellarchain.io",
}
_, err := client.Root()
if hErr := horizonclient.GetError(err); hErr != nil {
if hErr.Problem.Status == 500 {
log.Printf("Problem (%s): %s - extras=%v", hErr.Problem.Type, hErr.Problem.Detail, hErr.Problem.Extras)
}
}bash
curl -i -s "https://pubnet.stellarchain.io/" \
-H "Accept: application/hal+json"Common Root Causes
- Transient upstream RPC or R2 storage timeout.
- Unexpected internal exception while decoding historical records.