backend: Add error responses for recording conflicts and service unavailability; update success response status

This commit is contained in:
Carlos Santos 2025-04-16 11:09:18 +02:00
parent 50afeef235
commit f6532fa281
5 changed files with 31 additions and 10 deletions

View File

@ -1,8 +0,0 @@
description: Conflict — The room is already being recorded
content:
application/json:
schema:
$ref: '../../schemas/error.yaml'
example:
name: 'Recording Error'
message: 'The room "room-123" is already being recorded'

View File

@ -0,0 +1,16 @@
description: Conflict — The recording cannot be started due to resource state conflicts
content:
application/json:
schema:
$ref: '../../schemas/error.yaml'
examples:
already_recording:
summary: Room is already being recorded
value:
name: 'Recording Error'
message: 'The room "room-123" is already being recorded'
no_participants:
summary: Room has no participants
value:
name: 'Recording Error'
message: 'The room "room-123" has no participants'

View File

@ -0,0 +1,11 @@
description: Service Unavailable — The recording service is unavailable
content:
application/json:
schema:
$ref: '../../schemas/error.yaml'
examples:
starting_timeout:
summary: Recording service timed out
value:
name: 'Recording Error'
message: Recording in room 'room-123' timed out while starting

View File

@ -6,7 +6,7 @@ content:
example:
recordingId: 'room-123--EG_XYZ--XX445'
roomId: 'room-123'
status: 'STARTING'
status: 'ACTIVE'
filename: 'room-123--XX445.mp4'
startDate: 1600000000000
headers:

View File

@ -20,11 +20,13 @@
'404':
$ref: '../../components/responses/error-room-not-found.yaml'
'409':
$ref: '../../components/responses/internal/error-recording-already-started.yaml'
$ref: '../../components/responses/internal/error-recording-conflict.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
'503':
$ref: '../../components/responses/internal/error-service-unavailable.yaml'
/recordings/{recordingId}/stop:
post:
operationId: stopRecording