http://w3c.github.io/mediacapture-record/MediaRecorder.html#general-principles
If recording has been started and not yet stopped when the error occurs, then after raising the error, the UA must fire a dataavailable event, containing any data that it has gathered, and then a stop event.
This seems odd, it will mean that sometimes there will be data after the error event and sometimes there will not. How about instead requiring that if there is any data, that the dataavailable event be fired before the error event? Assuming that both the data and the error originates from the same bits of code then that ought to also match the actual order things happen in.