diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-08 14:35:35 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-08 14:35:35 -0700 |
commit | d5b80f29444e03aadc1130ab1624a09c0689fb93 (patch) | |
tree | e54537020d1ccad2a3c2816cdc4ac8c39b318bde /modules/gallery/helpers/item_rest.php | |
parent | 0aafec0e59c3ef48e8e2e6fc4a0b8aa458798619 (diff) |
Don't use the standard error formatting for exceptions that have occurred as part of a REST request. Format the exception as a json encoded text string so the client can extract the fault information if they so choose.
Diffstat (limited to 'modules/gallery/helpers/item_rest.php')
-rw-r--r-- | modules/gallery/helpers/item_rest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/helpers/item_rest.php b/modules/gallery/helpers/item_rest.php index f99afbc2..763e586f 100644 --- a/modules/gallery/helpers/item_rest.php +++ b/modules/gallery/helpers/item_rest.php @@ -161,7 +161,7 @@ class item_rest_Core { case "photo": case "movie": if (empty($request->file)) { - throw new Rest_Exception("Bad Request: Upload failed", 400); + throw new Rest_Exception("file: Upload failed", 400); } $item->type = $entity->type; $item->parent_id = $parent->id; |