The capitalization in the string "sql: transaction has already been committed or rolled back" changed. This PR fixes that problem and also handles the case where err is nil.
err