# Press release wire RSS feed 500 internal error

## TL;DR
A 500 from a wire's RSS feed is the provider's server failing, not your parser, and the right response is patient retry with backoff plus a fallback source. Wire feeds are usually reliable, so a 500 is transient; but a briefing should never depend on one feed. Retry a few times with growing waits, then switch to the backup wire or the company's IR site for that cycle.

## The error
```text
HTTP 500 Internal Server Error
(press release wire RSS feed failing; parser got an error page)
```

## When this helps
- a wire RSS feed returns 500
- press release intake stalls on server errors
- building resilient wire intake
- deciding retry versus fallback

## When it doesn't
- the 500 persists for days; that is an outage, use the backup permanently
- the error is 4xx; that is your request, not the server
- you need the wire's exact metadata; the backup may differ slightly

## Works with
Any HTTP client; python 3.8+ with requests. Wire feed behavior is provider-side.

## Steps
### 1. Retry with backoff; 500s are usually transient
```python
import time, requests
s = requests.Session()
s.headers.update({"User-Agent": "IntelBriefingBot/1.0"})
for i in range(4):
    r = s.get("https://YOUR-wire/rss/[feed]", timeout=30)
    print(i, r.status_code)
    if r.status_code != 500:
        break
    time.sleep(10 * (i + 1))
```
Expected: A non-500 response or a clean stop after 4 tries. Most wire 500s clear within minutes.

### 2. Verify the outage is not just your client
```bash
curl -s -o wire.html -w "HTTP %{http_code}\n" -A "IntelBriefingBot/1.0" "https://YOUR-wire/rss/[feed]"
head -c 200 wire.html; echo
```
Expected: The raw response. An error page confirms server trouble; a redirect to a status page says the same.

### 3. Switch to the backup wire for this cycle
```python
import json
routing = {"primary_wire": "[wire-a]", "backup_wire": "[wire-b]", "fallback": "company IR site"}
open("wire_routing.json", "w").write(json.dumps(routing, indent=2))
print("backup wire active for this cycle")
```
Expected: A routing switch. Releases are syndicated, so the backup wire carries the same announcements.

### 4. Dedupe across wires when both recover
```python
import hashlib
def rkey(company, date, headline):
    return hashlib.md5((company.strip().lower() + date + headline.strip().lower()[:60]).encode()).hexdigest()
print("dedupe key ready for wire-a and wire-b copies")
```
Expected: A dedupe key function. When the primary recovers, overlapping items collapse to one.

## Other ways people phrase this
### press release wire rss 500
Transient server failure. Backoff retry, then fallback.

### wire feed internal server error
The provider's problem. Your pipeline should route around it.

### rss feed 500 retry backoff
Growing waits between retries. Four tries, then switch sources.

## Why it happens
Wire RSS feeds are served by the provider's infrastructure, and 500s mean their side is failing: deploys, overload, or backend errors. The feed URL is fine and the parser is fine. Because releases are syndicated across wires, a single feed's outage never has to stall intake.

## Edge cases
- A 500 on every wire at once suggests your network path, not the wires; check from another network.
- Some wires return 500 for malformed query parameters; validate the feed URL first.
- Cache the last good feed state; the briefing can run one cycle stale rather than empty.
- Log 500 start and end times; duration distinguishes blips from outages.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_mQy6OOUg9EUHBSeNGjURvA
