failure.upstream
A service we depend on failed or timed out: a feed, an email provider, an API
Read https://www.prongs.dev/docs/intents/failure/upstream.md and tell me whether failure.upstream fits what I am building.Failure intents
Example
return fail('failure.upstream', 'Feed host timed out.', { cause: error });The caller getsTerminal
HTTP 502
{
"ok": false,
"error": "A service we depend on isn’t responding. Try again.",
"code": "failure.upstream"
}And it writes incident.degradedTS
{
"intent": "incident.degraded",
"level": "warn",
"alert": false,
"message": "Feed host timed out.",
"data": {
"intent": "failure.upstream",
"cause": {
"name": "PostgresError",
"message": "connection terminated unexpectedly",
"stack": "PostgresError: connection terminated…"
}
},
"time": "2026-10-09T12:00:00.000Z"
}Connections
- Writes
Choosing between neighbours
If it is
Use
A service we depend on failed or timed out: a feed, an email provider, an API
failure.upstream
For registry authors
Starter intents. These are the intents prongs add errors puts in your registry, raised with fail(). Change the messages to suit your app, and the statuses through the status.* intents they are built from.
The entry prongs add errors writes into your registry. Change the message here, or the status through its status.* ref.
'failure.upstream': {
kind: 'semantic',
description: 'A service we depend on failed or timed out: a feed, an email provider, an API',
refs: ['status.badgateway'],
binding: {
publicMessage: 'A service we depend on isn’t responding. Try again.',
logs: 'incident.degraded',
},
},