webrtc.js: Improve API error reporting