diff --git a/src/common/proxy_wasm/ngx_proxy_wasm_host.c b/src/common/proxy_wasm/ngx_proxy_wasm_host.c index 331eec334..11eb5d80d 100644 --- a/src/common/proxy_wasm/ngx_proxy_wasm_host.c +++ b/src/common/proxy_wasm/ngx_proxy_wasm_host.c @@ -1702,14 +1702,14 @@ ngx_proxy_wasm_hfuncs_get_metric(ngx_wavm_instance_t *instance, ngx_memzero(trapmsg, NGX_MAX_ERROR_STR); p = ngx_sprintf(trapmsg, - "could not retrieve metric id \"%ui\": ", + "could not retrieve metric id \"%ui\"", metric_id); if (rc == NGX_DECLINED) { - ngx_sprintf(p, "metric not found"); + ngx_sprintf(p, ": metric not found"); } else if (m->type == NGX_WA_METRIC_HISTOGRAM) { - ngx_sprintf(p, "metric is a histogram"); + ngx_sprintf(p, ": metric is a histogram"); } return ngx_proxy_wasm_result_trap(pwexec, (char *) trapmsg,