Generate the same structure for API success and API failures in the API examples.
authorMattias Michaux <mattias.michaux@gmail.com>
Mon, 16 May 2016 19:21:03 +0000 (21:21 +0200)
committerMattias Michaux <mattias.michaux@gmail.com>
Mon, 16 May 2016 19:21:03 +0000 (21:21 +0200)
tests/templates/documentFunction.tpl

index 43293eeda32672b03f64a421c05c0e8b741834c1..5a40ea76e7e3f74f5e70a10b6eb60441f65f3e04 100644 (file)
@@ -30,7 +30,8 @@ function {$function}_example() {literal}{{/literal}
     $errorCode = $e->getErrorCode();
     $errorData = $e->getExtraParams();
     return array(
-      'error' => $errorMessage,
+      'is_error' => 1,
+      'error_message' => $errorMessage,
       'error_code' => $errorCode,
       'error_data' => $errorData,
     );