diff --git a/lib/classes/API/V1/adapter.class.php b/lib/classes/API/V1/adapter.class.php index aaa64d6bed..2a931888ec 100644 --- a/lib/classes/API/V1/adapter.class.php +++ b/lib/classes/API/V1/adapter.class.php @@ -1926,9 +1926,9 @@ class API_V1_adapter extends API_V1_Abstract { $ret = array( 'id' => $databox_field->get_id(), - 'namespace' => $databox_field->get_metadata_namespace(), - 'source' => $databox_field->get_metadata_source(), - 'tagname' => $databox_field->get_metadata_tagname(), + 'namespace' => $databox_field->get_tag()->getGroupName(), + 'source' => $databox_field->get_tag()->getTagname(), + 'tagname' => $databox_field->get_tag()->getName(), 'name' => $databox_field->get_name(), 'separator' => $databox_field->get_separator(), 'thesaurus_branch' => $databox_field->get_tbranch(), diff --git a/lib/classes/API/V1/result.class.php b/lib/classes/API/V1/result.class.php index 4852b34d68..b7da890ab6 100644 --- a/lib/classes/API/V1/result.class.php +++ b/lib/classes/API/V1/result.class.php @@ -295,33 +295,33 @@ class API_V1_result switch ($code = (int) $code) { case 400: $this->http_code = $code; - $this->error_message = self::ERROR_BAD_REQUEST; - $this->error_details = API_V1_exception_badrequest::get_details(); + $this->error_type = self::ERROR_BAD_REQUEST; + $this->error_message = API_V1_exception_badrequest::get_details(); break; case 401: $this->http_code = $code; - $this->error_message = self::ERROR_UNAUTHORIZED; - $this->error_details = API_V1_exception_unauthorized::get_details(); + $this->error_type = self::ERROR_UNAUTHORIZED; + $this->error_message = API_V1_exception_unauthorized::get_details(); break; case 403: $this->http_code = $code; - $this->error_message = self::ERROR_FORBIDDEN; - $this->error_details = API_V1_exception_forbidden::get_details(); + $this->error_type = self::ERROR_FORBIDDEN; + $this->error_message = API_V1_exception_forbidden::get_details(); break; case 404: $this->http_code = $code; - $this->error_message = self::ERROR_NOTFOUND; - $this->error_details = API_V1_exception_notfound::get_details(); + $this->error_type = self::ERROR_NOTFOUND; + $this->error_message = API_V1_exception_notfound::get_details(); break; case 405: $this->http_code = $code; - $this->error_message = self::ERROR_METHODNOTALLOWED; - $this->error_details = API_V1_exception_methodnotallowed::get_details(); + $this->error_type = self::ERROR_METHODNOTALLOWED; + $this->error_message = API_V1_exception_methodnotallowed::get_details(); break; case 500: $this->http_code = $code; - $this->error_message = self::ERROR_INTERNALSERVERERROR; - $this->error_details = API_V1_exception_internalservererror::get_details(); + $this->error_type = self::ERROR_INTERNALSERVERERROR; + $this->error_message = API_V1_exception_internalservererror::get_details(); break; }