Add a read.onerror that does the same thing as write.onerror.  You can probably write a single onerror function and assign it to various callbacks.