return GNUNET_OK;
}
+/**
+ * Create a JSON API error
+ *
+ * @param res the JSON error
+ */
+struct GNUNET_JSONAPI_Error*
+GNUNET_JSONAPI_error_new (const char *id,
+ const char *status,
+ const char *code,
+ const char *title,
+ const char *detail,
+ json_t *links,
+ json_t *source,
+ json_t *meta)
+{
+ struct GNUNET_JSONAPI_Error *error;
+ error = GNUNET_new (struct GNUNET_JSONAPI_Error);
+
+ if (NULL != id)
+ error->id = GNUNET_strdup (id);
+ if (NULL != status)
+ error->status = GNUNET_strdup (status);
+ if (NULL != code)
+ error->code = GNUNET_strdup (code);
+ if (NULL != title)
+ error->title = GNUNET_strdup (title);
+ if (NULL != detail)
+ error->detail = GNUNET_strdup (detail);
+ if (NULL != links)
+ error->links = json_deep_copy (links);
+ if (NULL != source)
+ error->source = json_deep_copy (source);
+ if (NULL != meta)
+ error->meta = json_deep_copy (meta);
+ return error;
+}
/**
* Delete a JSON API error
*