@@ -19,6 +19,8 @@ void _ld_set_last_rest_error(struct ld_context *ctx, req_t *req) | |||
json_error_t err; | |||
json_t *res = json_loads(req->text, 0, &err); | |||
requests_close(req); | |||
if (!res) | |||
{ | |||
log_error("failed to parse json at line %d: %s", err.line, err.text); |