Fix broken single row upsert and error handling

I broke single row upsert while doing the computed columns refactoring, this PR fixes it. Error handling also does not work quite as it should, so I fixed that too.