Problem
nethcti-middleware's summary/transcription/history endpoints (GET/HEAD/PUT /summary/:uniqueid, POST /history/statuses, GET /history/calls, GET /transcripts/:uniqueid) return a hard 503 satellite database schema not initialized whenever the satellite transcripts table doesn't exist, even when that simply means "nothing has been persisted yet" (fresh instance, or before the first successful call), not an actual outage.
This is indistinguishable, on the client, from a real database failure, and made an ordinary fresh-instance state look like a broken deployment while investigating a related issue.
Root cause
isSatelliteSchemaMissingError is checked in several handlers and always maps to a 503 response (writeSatelliteSchemaMissingResponse / inline http.StatusServiceUnavailable), even though every one of those handlers already has a well-defined "no data found" response for the exact same situation (404, 204, or an empty/not_found item), used when the table exists but simply has no matching row.
Test Case
- On an instance with satellite configured but where the
transcripts table does not exist yet (fresh instance before any successful persisted call).
- Call
HEAD /summary/:uniqueid, POST /history/statuses, GET /transcripts/:uniqueid, GET /summary/:uniqueid, GET /history/calls?...&artifact=summary: each returns 503 instead of the same not-found/empty response used for a genuinely absent record.
Problem
nethcti-middleware's summary/transcription/history endpoints (
GET/HEAD/PUT /summary/:uniqueid,POST /history/statuses,GET /history/calls,GET /transcripts/:uniqueid) return a hard503 satellite database schema not initializedwhenever the satellitetranscriptstable doesn't exist, even when that simply means "nothing has been persisted yet" (fresh instance, or before the first successful call), not an actual outage.This is indistinguishable, on the client, from a real database failure, and made an ordinary fresh-instance state look like a broken deployment while investigating a related issue.
Root cause
isSatelliteSchemaMissingErroris checked in several handlers and always maps to a503response (writeSatelliteSchemaMissingResponse/ inlinehttp.StatusServiceUnavailable), even though every one of those handlers already has a well-defined "no data found" response for the exact same situation (404, 204, or an empty/not_founditem), used when the table exists but simply has no matching row.Test Case
transcriptstable does not exist yet (fresh instance before any successful persisted call).HEAD /summary/:uniqueid,POST /history/statuses,GET /transcripts/:uniqueid,GET /summary/:uniqueid,GET /history/calls?...&artifact=summary: each returns503instead of the same not-found/empty response used for a genuinely absent record.