Skip to content

Commit

Permalink
leds api: check http_request_query err
Browse files Browse the repository at this point in the history
  • Loading branch information
SpComb committed Jan 6, 2025
1 parent 1c8293b commit e52b09e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main/leds_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ int leds_api_query(struct http_request *request, struct leds_api_query *query)
}
}

if (err < 0) {
LOG_WARN("http_request_query");
return err;
}

if (!query->state) {
LOG_WARN("missing ?leds=...");
return HTTP_UNPROCESSABLE_ENTITY;
Expand Down

0 comments on commit e52b09e

Please sign in to comment.