ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kasnacheev <ilya.kasnach...@gmail.com>
Subject REST GridCacheCommandHandler writes ERROR in log in case of bad user input
Date Fri, 14 Dec 2018 13:45:15 GMT
Hello!

It seems that we have subj behavior since the earliest days if Apache
Ignite.

If you send a REST command with error in it (such as missing "keys" for
getAll), you will get a nice
[2018-10-30 22:22:14,021][ERROR][rest-#61061][GridCacheCommandHandler]
Failed to execute cache command: GridRestCacheRequest
error in your logs.

Which is probably an overkill since ERROR usually means unexpected and
severe errors in application code as opposed to user input validation
errors.

This made worse by the fact that you can have some automatic REST client do
a lot of incorrect requests, spam your logs with thousands of such ERRORs.
The error is returned to client but it is also tee'd to log.

What we could do:
- Move log level from ERROR to WARN or even INFO.
- Handle REST user input validation errors differently from Ignite internal
errors by introducing new exception class, logging it as INFO or maybe just
returning to user.
- Third funny option?

WDYT?

Regards,
-- 
Ilya Kasnacheev

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message