ui: better error handling