We are trying to capture the console log error's which is throw from front end errors. Below code snippet used for capture the logs,
$driver.on_log_event(:console) do |event|
$logs.push(event)
end
By this code snippet we could capture only the browser default and not capturing the application thrown errors. Are we missing anything here.
This error's are captured from console,

The below actual errors are not capturing on the logs,
I could able to capture console error's using selenium4 method "on_log_event" method. But need to capture the network api error as well.
