[fix test] Added failing tests for #396.
err can be a string