rostack_v1 / 2026-08-13 / draft

Errors

Every protocol error is defined by this specification. Discovery advertises the subset an implementation can return in errors.http and errors.websocket. Each declaration also lists the operations that can produce that error. An implementati

Every protocol error is defined by this specification. Discovery advertises the subset an implementation can return in errors.http and errors.websocket. Each declaration also lists the operations that can produce that error. An implementation MUST NOT return an HTTP problem type or WebSocket error code outside the registry below, and MUST NOT return a registered error that it did not advertise for the current operation. Clients MUST NOT infer additional error semantics from title, detail, or message.

HTTP Problems#

Non-success HTTP responses use application/problem+json as defined by RFC 9457. The object MUST contain type, title, status, and only the optional or conditionally required members defined by the problem schema. No other members are allowed. type MUST be an absolute registry URI. title is the stable title below and status is the listed HTTP status.

Type suffixStatusTitleRequired memberMeaning
invalid-request400Invalid requestNoneRequest syntax or a standard parameter is malformed.
invalid-filter400Invalid filterNoneThe filter does not conform to the filter schema.
unsupported-filter400Unsupported filterNoneA valid filter uses an unadvertised field or operator.
invalid-sort400Invalid sortNoneSort syntax or a sort field is invalid.
invalid-fields400Invalid fieldsNoneProjection syntax or a projected field is invalid.
invalid-cursor400Invalid cursorNoneA collection cursor is malformed, expired, or outside its query scope.
authentication-required401Authentication requiredNoneCredentials are missing, invalid, expired, or revoked.
permission-denied403Permission deniedNoneValid credentials lack a required permission.
resource-not-found404Resource not foundNoneThe requested item does not exist or is not visible to the principal.
method-not-allowed405Method not allowedNoneThe requested method is not a permitted read-only operation.
representation-not-acceptable406Representation not acceptableNoneNo advertised representation satisfies Accept.
resource-gone410Resource goneNoneA deleted event detail is known to be permanently unavailable.
rate-limited429Rate limitedretry_after_msThe client must delay another attempt.
internal-error500Internal errorNoneAn unexpected server failure occurred.
service-unavailable503Service unavailableretry_after_msA transient dependency or server condition prevents service.

Every type URI has the prefix https://spec.pmh.codes/problems/. A response MAY include detail, instance, and request_id only when their corresponding members are defined by the problem schema. Those values MUST NOT expose credentials, inaccessible resources or fields, private network locations, or other principals' identifiers. retry_after_ms is an integer delay from receipt and MUST be present only for rate-limited or service-unavailable.

An implementation that cannot safely distinguish an absent resource from an unauthorized resource MUST use resource-not-found for both. Unexpected failures MUST use internal-error; an implementation-specific type is not a fallback. HTTP cache validation may return 304 Not Modified; it is not an error and does not carry a problem object.

WebSocket Errors#

The WebSocket error.code registry is closed:

CodeRetryableRequired contextMeaning
invalid_messageNoNoneThe message is malformed or violates protocol sequencing.
authentication_failedYesNoneInitial or replacement credentials are invalid.
reauthentication_identity_mismatchNoNoneReplacement credentials change method or principal.
permission_deniedNoSubscription ID when applicableThe principal lacks a required permission.
permission_revokedNoSubscription IDA required permission was removed.
resource_not_foundNoSubscription IDThe named resource is unavailable to the principal.
unsupported_event_typeNoSubscription IDA requested event type was not advertised for the resource.
unsupported_filterNoSubscription IDEvent filtering or a requested field or operator was not advertised.
unsupported_encodingNoSubscription IDThe requested event encoding was not advertised.
subscription_id_conflictNoSubscription IDAn active ID was reused with a different definition.
cursor_scope_mismatchNoSubscription IDA cursor belongs to another implementation, version, resource, or principal.
cursor_unavailableNoSubscription IDReplay from the cursor is no longer available.
rate_limitedYesretry_after_msThe client must delay another attempt.
internal_errorYesNoneAn unexpected gateway failure occurred.
service_unavailableYesretry_after_msA transient condition prevents the operation.

retryable MUST equal the value in this table. retry_after_ms MUST be present for rate_limited and service_unavailable and MUST be absent for every other code. subscription_id MUST be present where the table requires it and MUST be absent when the error cannot be assigned to a subscription. A server closes the connection only when continued protocol operation is unsafe or when a close rule elsewhere in this specification requires it.