[minor] Improve error reporting