module Bookshelf
module Actions
module Books
class Index < Bookshelf::Action
handle_exception RecordNotFound => :handle_not_found_error
def handle(*, response)
raise RecordNotFound
end
private
def handle_standard_error(request, response, exception)
halt 404
end
end
end
end
end
The code above logs the following firstly.
[bookshelf] [ERROR] [2023-08-04 16:03:16 +0000] POST 500 0µs 192.168.80.1 /hoge 106 app="bookshelf" http="HTTP/1.0"
in accord with the code of dry-monitor
Secondly it logs the following.
[bookshelf] [INFO] [2023-08-04 16:03:16 +0000] POST 403 830ms 192.168.80.1 /hoge 106 app="bookshelf" http="HTTP/1.0"
in accord with the code of dry-monitor
I think it is odd that first logging is treated as ERROR, not WARN or INFO.
How can I avoid 40x error from logging as ERROR?