Google is transitioning third-party smart home account linking to be handled fully and independently within the Google Home app. Updates to your integration may be needed before September 30, 2026. For more information, see the Account linking migration guide.
Use the HandlerError class to return an error status from your intent
handler code. Classes such as DeviceManager return an instance of
HandlerError when an error occurs.
For other errors that may occur in your app, you can create a new
instance and return a rejected Promise.
identifyHandler(request: IntentFlow.IdentifyRequest):
Promise<IntentFlow.IdentifyResponse> {
const scanData = request.inputs[0].payload.device.udpScanData;
if (!scanData) {
const err = new IntentFlow.HandlerError(request.requestId,
ErrorCode.INVALID_REQUEST, 'Scan data not found');
returnPromise.reject(err);
}
...
}
Errors returned by your app are visible in your cloud project logs.
For more details, see the error logging
developer guide.
Use the
HandlerErrorclass to return an error status from your intent handler code. Classes such as DeviceManager return an instance ofHandlerErrorwhen an error occurs. For other errors that may occur in your app, you can create a new instance and return a rejectedPromise.identifyHandler(request: IntentFlow.IdentifyRequest): Promise<IntentFlow.IdentifyResponse> { const scanData = request.inputs[0].payload.device.udpScanData; if (!scanData) { const err = new IntentFlow.HandlerError(request.requestId, ErrorCode.INVALID_REQUEST, 'Scan data not found'); return Promise.reject(err); } ... }Errors returned by your app are visible in your cloud project logs. For more details, see the error logging developer guide.