test(lib): tests for errors
Merge remote-tracking branch 'origin/0.4' into 0.4