Problem errors.problem@1
Generated at from
openvibe-contracts v0.33.0 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- contracts
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-002
- Schema
https://openvibe.network/contracts/errors/problem.v1.json
RFC 9457 problem details (application/problem+json) with a stable OpenVibe error code and trace identifiers. The legacy 'error' string is allowed during migration so existing clients keep working.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
type | string | yes |
| |
title | string | yes |
| |
status | integer | yes |
| |
detail | string | |||
instance | string |
| ||
code | string | yes |
| |
request_id | string | |||
trace_id | string |
| ||
errors | array of object | |||
errors[].path | string | |||
errors[].message | string | yes | ||
error | string | Deprecated compatibility field: same text as title/detail for clients that read {error}. |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: denied
{
"type": "https://openvibe.network/problems/capability.denied",
"title": "Forbidden",
"status": 403,
"code": "capability.denied",
"detail": "media.object.upload not granted",
"request_id": "req_0123456789ab",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"error": "media.object.upload not granted"
}Rejected: 2xx-status
{
"type": "about:blank",
"title": "OK",
"status": 200,
"code": "ok"
}Rejected: bad-trace
{
"type": "about:blank",
"title": "x",
"status": 400,
"code": "x",
"trace_id": "nope"
}Rejected: no-code
{
"type": "about:blank",
"title": "Bad Request",
"status": 400
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('errors.problem@1', value); // { valid, errors: [{ path, message }] }