res_ari_playback: Add missing 404 error response for GET and DELETE.
authorJoshua Colp <jcolp@digium.com>
Tue, 29 Oct 2013 11:15:59 +0000 (11:15 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 29 Oct 2013 11:15:59 +0000 (11:15 +0000)
(closes issue ASTERISK-22722)
Reported by: Richard Mudgett
........

Merged revisions 402139 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_ari_playback.c
rest-api/api-docs/playback.json

index e30800d..06538f5 100644 (file)
@@ -85,6 +85,7 @@ static void ast_ari_get_playback_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* The playback cannot be found */
                is_valid = 1;
                break;
        default:
@@ -141,6 +142,7 @@ static void ast_ari_stop_playback_cb(
                break;
        case 500: /* Internal Server Error */
        case 501: /* Not Implemented */
+       case 404: /* The playback cannot be found */
                is_valid = 1;
                break;
        default:
index a195186..880aaa0 100644 (file)
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "The playback cannot be found"
+                                               }
                                        ]
                                },
                                {
                                                        "allowMultiple": false,
                                                        "dataType": "string"
                                                }
+                                       ],
+                                       "errorResponses": [
+                                               {
+                                                       "code": 404,
+                                                       "reason": "The playback cannot be found"
+                                               }
                                        ]
                                }
                        ]