added logic to ensure an error doesn't occur when submitting a failed micropost