From 28fc2b9ee985cdce7c43114316a1fbcc80ab997d Mon Sep 17 00:00:00 2001 From: Erik Timan Date: Thu, 1 Dec 2022 12:20:11 +0100 Subject: [PATCH] fix(mgmt_api): add missing error codes in schema --- apps/emqx_management/src/emqx_mgmt_api_subscriptions.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/emqx_management/src/emqx_mgmt_api_subscriptions.erl b/apps/emqx_management/src/emqx_mgmt_api_subscriptions.erl index ed2aa0c6d..2cb5a4efe 100644 --- a/apps/emqx_management/src/emqx_mgmt_api_subscriptions.erl +++ b/apps/emqx_management/src/emqx_mgmt_api_subscriptions.erl @@ -62,7 +62,11 @@ schema("/subscriptions") -> tags => [<<"Subscriptions">>], parameters => parameters(), responses => #{ - 200 => hoconsc:mk(hoconsc:array(hoconsc:ref(?MODULE, subscription)), #{}) + 200 => hoconsc:mk(hoconsc:array(hoconsc:ref(?MODULE, subscription)), #{}), + 400 => emqx_dashboard_swagger:error_codes( + ['INVALID_PARAMETER'], <<"Invalid parameter">> + ), + 500 => emqx_dashboard_swagger:error_codes(['NODE_DOWN'], <<"Bad RPC">>) } } }.