qdrw: return meaningful error codes.