---
title: "media.provider.health_degraded@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/media.provider.health_degraded"
updated: null
---

# media.provider.health\_degraded@1 · OpenVibe.Services

HTML: [media.provider.health\_degraded@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/media.provider.health_degraded)

# MediaProviderHealthDegradedPayload `media.provider.health_degraded@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: media
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/payloads/media.provider.health_degraded.v1.json`](/docs/contracts/media.provider.health_degraded.json)

media.provider.health\_degraded v1 (OpenVibe.Media server/placement/providers.js liveHealth(), the announceProviderEvent on a healthy→unhealthy flip; PR #18). A storage provider that was healthy failed its per-minute HeadBucket, so the fabric stops routing to it until it answers again. Emitted once per flip, not once per tick: another failing HEAD while it is already unhealthy records nothing, and a recovery is a media.storage.recovered style state change, not another degradation. The event lives in the media namespace because OpenVibe.Events gates a service's event\_type to a prefix that starts with its source name; the original provider.\* type could never be published by source media (403 events.type\_not\_allowed). Envelope: subject { type: provider, id: <provider> }, visibility internal, priority low, actor service:media, source media.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `app_id` | string \| null | yes | Always null: a provider serves every tenant, so the signal belongs to no one app. |  |
| `provider` | enum | yes | The provider that failed its health check. | - `one of "local", "b2", "r2"` |
| `healthy` | const | yes | This event exists only for the healthy→unhealthy flip, so it is always false. | - `= false` |
| `last_error` | string | yes | The error the failed health check recorded. | - `minLength 1`<br>- `maxLength 500` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: r2-outage

~~~~
{
  "app_id": null,
  "provider": "r2",
  "healthy": false,
  "last_error": "HeadBucket 503 Service Unavailable"
}
~~~~

Rejected: healthy-true

~~~~
{
  "app_id": null,
  "provider": "r2",
  "healthy": true,
  "last_error": "HeadBucket 503 Service Unavailable"
}
~~~~

Rejected: unknown-provider

~~~~
{
  "app_id": null,
  "provider": "s3",
  "healthy": false,
  "last_error": "HeadBucket 503 Service Unavailable"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('media.provider.health_degraded@1', value);   // { valid, errors: [{ path, message }] }
~~~~
