Error Handling
try {
const mediaId = await instagram.postImage(url, caption);
console.log('Posted successfully:', mediaId);
} catch (error) {
console.error('Failed to post:', error.message);
// Handle error appropriately
}Source captured: 2026-10-11