Skip to content

Commit

Permalink
Fix restful plugin log handler error code reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
eeff committed Mar 24, 2022
1 parent de5fcb2 commit 853b3c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/restful/log_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void handle_get_log(nng_aio *aio)
0 != http_get_param_uint32(aio, "page", &page) ||
0 != http_get_param_uint32(aio, "page_size", &page_size) ||
page_size < LOG_PAGE_SIZE_MIN || LOG_PAGE_SIZE_MAX < page_size) {
NEU_JSON_RESPONSE_ERROR(NEU_ERR_BODY_IS_WRONG, {
NEU_JSON_RESPONSE_ERROR(NEU_ERR_PARAM_IS_WRONG, {
http_response(aio, error_code.error, result_error);
});
return;
Expand All @@ -94,7 +94,7 @@ void handle_get_log(nng_aio *aio)
// optional param
level_str = http_get_param(aio, "level", &len);
if (NULL != level_str && 0 != string_to_log_level(level_str, len, &level)) {
NEU_JSON_RESPONSE_ERROR(NEU_ERR_BODY_IS_WRONG, {
NEU_JSON_RESPONSE_ERROR(NEU_ERR_PARAM_IS_WRONG, {
http_response(aio, error_code.error, result_error);
});
return;
Expand Down

0 comments on commit 853b3c0

Please sign in to comment.