mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
ARI: Correct error codes for bridge operations
This patch adds error checking to ARI bridge operations, when adding/removing channels to/from bridges. In general, the error codes fall out as follows: * Bridge not found - 404 Not Found * Bridge not in Stasis - 409 Conflict * Channel not found - 400 Bad Request * Channel not in Stasis - 422 Unprocessable Entity * Channel not in this bridge (on remove) - 422 Unprocessable Entity (closes issue ASTERISK-22036) Review: https://reviewboard.asterisk.org/r/2769/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -130,6 +130,10 @@
|
||||
}
|
||||
],
|
||||
"errorResponses": [
|
||||
{
|
||||
"code": 400,
|
||||
"reason": "Channel not found"
|
||||
},
|
||||
{
|
||||
"code": 404,
|
||||
"reason": "Bridge not found"
|
||||
@@ -140,7 +144,7 @@
|
||||
},
|
||||
{
|
||||
"code": 422,
|
||||
"reason": "Channel not found, or not in Stasis application"
|
||||
"reason": "Channel not in Stasis application"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -172,6 +176,24 @@
|
||||
"allowMultiple": true,
|
||||
"dataType": "string"
|
||||
}
|
||||
],
|
||||
"errorResponses": [
|
||||
{
|
||||
"code": 400,
|
||||
"reason": "Channel not found"
|
||||
},
|
||||
{
|
||||
"code": 404,
|
||||
"reason": "Bridge not found"
|
||||
},
|
||||
{
|
||||
"code": 409,
|
||||
"reason": "Bridge not in Stasis application"
|
||||
},
|
||||
{
|
||||
"code": 422,
|
||||
"reason": "Channel not in this bridge"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user