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:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-13 05:05:16 +0000
commit8f5d8f3de6cae180af37917ef978a4affc2cd464 (patch)
tree4bfe1abc6d19c2dd635d1b83cc0e73d0aa6904ac /web/api/formatters/rrd2json.c
parentAdding upstream version 1.17.0. (diff)
downloadnetdata-8f5d8f3de6cae180af37917ef978a4affc2cd464.tar.xz
netdata-8f5d8f3de6cae180af37917ef978a4affc2cd464.zip
Adding upstream version 1.17.1.upstream/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;
}