str7x: improve error handling