From e1b6c0770db445cbb4ac3b4990c3dce39cd26e9e Mon Sep 17 00:00:00 2001 From: DDDHuang <44492639+DDDHuang@users.noreply.github.com> Date: Thu, 17 Mar 2022 16:12:18 +0800 Subject: [PATCH] fix: getway bad api spec --- apps/emqx_gateway/include/emqx_gateway_http.hrl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/emqx_gateway/include/emqx_gateway_http.hrl b/apps/emqx_gateway/include/emqx_gateway_http.hrl index a36412a29..75f661d7f 100644 --- a/apps/emqx_gateway/include/emqx_gateway_http.hrl +++ b/apps/emqx_gateway/include/emqx_gateway_http.hrl @@ -16,11 +16,12 @@ -define(BAD_REQUEST, 'BAD_REQUEST'). -define(NOT_FOUND, 'NOT_FOUND'). +-define(RESOURCE_NOT_FOUND, 'RESOURCE_NOT_FOUND'). -define(INTERNAL_ERROR, 'INTERNAL_SERVER_ERROR'). -define(STANDARD_RESP(R), R#{ 400 => emqx_dashboard_swagger:error_codes( [?BAD_REQUEST], <<"Bad request">>) , 404 => emqx_dashboard_swagger:error_codes( - [?NOT_FOUND], <<"Not Found">>) + [?NOT_FOUND, ?RESOURCE_NOT_FOUND], <<"Not Found">>) }).