[fix] make sure an error is returned