[connman] fix crash and report error properly.