added extradata for db failure to register device
DEvice defines API and service call added. Now device defines are fetched from DB before registering the device.