prongs
GitHub

failure.internal

Our fault: a bug, a failed database call. The caller gets a generic message; the details go to the log

Profile

Raised with

Status

500

Message

generic
Read https://www.prongs.dev/docs/intents/failure/internal.md and tell me whether failure.internal fits what I am building.

Example

TS
return fail('failure.internal', undefined, { cause: error });
The caller gets
Terminal
HTTP 500

{
"ok": false,
"error": "Something went wrong. Try again.",
"code": "failure.internal"
}
And it writes incident.failed
TS
{
"intent": "incident.failed",
"level": "error",
"alert": true,
"message": "Something went wrong. Try again.",
"data": {
"intent": "failure.internal",
"cause": {
"name": "PostgresError",
"message": "connection terminated unexpectedly",
"stack": "PostgresError: connection terminated…"
}
},
"time": "2026-10-09T12:00:00.000Z"
}

Connections

Choosing between neighbours

  • If it is

    Use

  • Our fault: a bug, a failed database call. The caller gets a generic message; the details go to the log

    failure.internal
  • Anything the caller did wrong

    request.invalid

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.

TS
'failure.internal': {
kind: 'semantic',
description: 'Our fault: a bug, a failed database call. The caller gets a generic message; the details go to the log',
refs: ['status.internal'],
keywords: ['crash', 'exception', 'database', 'bug'],
binding: {
publicMessage: 'Something went wrong. Try again.',
logs: 'incident.failed',
},
notFor: [
{ context: 'anything the caller did wrong', instead: 'request.invalid' },
],
},