[fix] Only throw when in error state

Fixes #19.