Fixing error handling to propagate errors in the UI