uas: improve error handling