Wowza rest API error code 409 The request could not be completed due to a conflict with the current state of the resource

Hello.
I use a wowza streaming engine as a platform for recording live streams from outside cameras. For using start and stop recording I use wowza rest API via nodejs application, sometimes I get error from wowza rest api: The request could not be completed due to a conflict with the current state of the resource

Please explain how to understand this error?

Part of log when I get error:
_header: ‘POST /v2/servers/defaultServer/vhosts/defaultVHost/applications/streams-recorder/instances/definst/streamrecorders/camera-2.stream HTTP/1.1\r\n’ +
‘Accept: application/json, text/plain, /\r\n’ +
‘Content-Type: application/json;charset=utf-8\r\n’ +
‘User-Agent: axios/0.19.2\r\n’ +
‘Content-Length: 714\r\n’ +
‘Host: x.x.x.x:8087\r\n’ +
‘Authorization: Basic aaaaabbbbcccccxxxxx=\r\n’ +
‘Connection: close\r\n’ +
‘\r\n’,
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: ‘POST’,
insecureHTTPParser: undefined,
path: ‘/v2/servers/defaultServer/vhosts/defaultVHost/applications/streams-recorder/instances/definst/streamrecorders/camera-2.stream’,
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
data: {
message: ‘The request could not be completed due to a conflict with the current state of the resource’,
success: false,
code: ‘409’,
wowzaServer: ‘4.8.14+9’
}

Version: wowzaServer: '4.8.14+9

Some possible reasons we’ve seen this error occur in the past:

  1. You are not setting your $recordName variable to your incoming stream name.
  2. Another reason for the error you received is if the recording is already in process.
  3. You are unable to create more than one recording per stream

There could be a few other reasons for that error with recordings, but typically they occur due to naming issues or repeat requests. In order to accurately diagnose why you are getting this error however, we will require a support ticket for a configuration review.