summaryrefslogtreecommitdiff
path: root/rest-api
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-08-23 17:19:02 +0000
committerDavid M. Lee <dlee@digium.com>2013-08-23 17:19:02 +0000
commit7a581537e8baaff143254415d782a492dec97a62 (patch)
treebe5296efe1ee7f85581b3e0c69c8ad6be252eb00 /rest-api
parent9f4849724fce1a780771e11bd5273eac2b4f61b8 (diff)
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
Diffstat (limited to 'rest-api')
-rw-r--r--rest-api/api-docs/bridges.json24
1 files changed, 23 insertions, 1 deletions
diff --git a/rest-api/api-docs/bridges.json b/rest-api/api-docs/bridges.json
index b698dcfeb..9f8af9e0e 100644
--- a/rest-api/api-docs/bridges.json
+++ b/rest-api/api-docs/bridges.json
@@ -131,6 +131,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"
+ }
]
}
]