WatchCheckFailedPayload watch.check.failed@1
Generated at from
openvibe-contracts v0.107.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- watch
- Visibility
- first-party
- Status
- planned
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/watch.check.failed.v1.json
watch.check.failed v1 (OpenVibe.Watch, plan T18): a check ended in a failure state. consecutive_failures is how many runs in a row have failed, so a consumer can tell a blip from a watch that is down. Envelope: subject { type: watch, id: <watch_id> }, visibility internal, priority normal, actor service:watch.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
watch_id | string | yes |
| |
state | enum | yes |
| |
carrier | enum | yes |
| |
http_status | integer | null | yes | ||
error_code | string | null | yes | ||
consecutive_failures | integer | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: http-error
{
"watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"state": "http_error",
"carrier": "http",
"http_status": 503,
"error_code": "upstream_unavailable",
"consecutive_failures": 2
}Rejected: zero-failures
{
"watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"state": "timeout",
"carrier": "api",
"http_status": null,
"error_code": "deadline_exceeded",
"consecutive_failures": 0
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('watch.check.failed@1', value); // { valid, errors: [{ path, message }] }