I am using custom allocation policy in device provisioning service (DPS) to register my iot device to iot hub, in which I am triggering azure function for the same.
Now if my function logic fails, I have to send the custom error message to a device, how would I do that? I know that we can send custom HTTP status code to the device in case of failure but I have to send some custom message along with that code.