converter: improve error handling