Add error handling to ajaxBBC