diff --git a/include/api.php b/include/api.php index b6869a2b13..6a00268b04 100644 --- a/include/api.php +++ b/include/api.php @@ -386,11 +386,11 @@ function api_call(App $a, App\Arguments $args = null) */ function api_error($type, $e, App\Arguments $args) { - $error = ($e->getMessage() !== "" ? $e->getMessage() : $e->httpdesc); + $error = ($e->getMessage() !== "" ? $e->getMessage() : $e->getDescription()); /// @TODO: https://dev.twitter.com/overview/api/response-codes $error = ["error" => $error, - "code" => $e->getCode() . " " . $e->httpdesc, + "code" => $e->getCode() . " " . $e->getDescription(), "request" => $args->getQueryString()]; $return = api_format_data('status', $type, ['status' => $error]);