From d5b80f29444e03aadc1130ab1624a09c0689fb93 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 8 Jun 2010 14:35:35 -0700 Subject: 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. --- modules/gallery/helpers/item_rest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers') 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; -- cgit v1.2.3