You are not billed for user queries that return 404 errors or any other query requests that return a non-2xx status.
For example, if a malicious user is sending requests to an invalid/undefined index on your application, this does not impact your usage.
Erroneous responses return nbQueries = 0
, so the total usage on your application is not increased and you will not be billed for these requests.