I think the real bug is that the endpoint for device registration actually returns a JSON payload. It should not