fix: error handling

This commit is contained in:
karishmas6
2024-06-06 05:12:14 +05:30
parent e03cfaf389
commit b27c45fc21

View File

@@ -678,7 +678,12 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
}
}, { x: coordinates.x, y: coordinates.y });
return selectors;
}
} catch (e) {
const { message, stack } = e as Error;
logger.log('error', `Error while retrieving element: ${message}`);
logger.log('error', `Stack: ${stack}`);
}
return null;
};