uid_avp_db: better error handling