summaryrefslogtreecommitdiffstats
path: root/web/api/formatters/rrd2json.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-13 05:05:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-13 05:05:25 +0000
commitd72015c7962af72903326a01fb114f8f2d37eebc (patch)
tree5bb5ae6928f3f2a92f478f69c2f5c9aa9333fbf8 /web/api/formatters/rrd2json.c
parentReleasing debian version 1.17.0-3. (diff)
downloadnetdata-d72015c7962af72903326a01fb114f8f2d37eebc.tar.xz
netdata-d72015c7962af72903326a01fb114f8f2d37eebc.zip
Merging upstream version 1.17.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/formatters/rrd2json.c')
-rw-r--r--web/api/formatters/rrd2json.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/api/formatters/rrd2json.c b/web/api/formatters/rrd2json.c
index 5cdcc80ff..17b1a301b 100644
--- a/web/api/formatters/rrd2json.c
+++ b/web/api/formatters/rrd2json.c
@@ -72,7 +72,7 @@ int rrdset2value_api_v1(
RRDR *r = rrd2rrdr(st, points, after, before, group_method, group_time, options, dimensions);
if(!r) {
if(value_is_null) *value_is_null = 1;
- return 500;
+ return HTTP_RESP_INTERNAL_SERVER_ERROR;
}
if(rrdr_rows(r) == 0) {
@@ -82,7 +82,7 @@ int rrdset2value_api_v1(
if(db_before) *db_before = 0;
if(value_is_null) *value_is_null = 1;
- return 400;
+ return HTTP_RESP_BAD_REQUEST;
}
if(wb) {
@@ -99,7 +99,7 @@ int rrdset2value_api_v1(
*n = rrdr2value(r, i, options, value_is_null);
rrdr_free(r);
- return 200;
+ return HTTP_RESP_OK;
}
int rrdset2anything_api_v1(
@@ -120,7 +120,7 @@ int rrdset2anything_api_v1(
RRDR *r = rrd2rrdr(st, points, after, before, group_method, group_time, options, dimensions?buffer_tostring(dimensions):NULL);
if(!r) {
buffer_strcat(wb, "Cannot generate output with these parameters on this chart.");
- return 500;
+ return HTTP_RESP_INTERNAL_SERVER_ERROR;
}
if(r->result_options & RRDR_RESULT_OPTION_RELATIVE)
@@ -294,5 +294,5 @@ int rrdset2anything_api_v1(
}
rrdr_free(r);
- return 200;
+ return HTTP_RESP_OK;
}