If your inserts are idempotent, update or replace
would help you out.
Given they are likely not, there isn't any super-efficient way to do this without something falling back to inserting individual rows as a fallback - to isolate the problem row.
If you are batching inserts to reduce latency from client to server, consider using a stored procedure to take the rows, and does insert on the server side taking all the data in a shot; that can have a fallback that does appropriate error handling on a row-by-row basis.
That assumes, of course, that there is some meaningful error handling that can be done on the server side without needing synchronous communication to the client.