Only throw the first error on syncing the whole database.

When syncing the whole database, we get a list of errors in case of
failure. Throwing a list makes it difficult for other middlewares to
handle the error. Therefore, we throw only the first error.