Add error handling to instagram endpoint