Added catch for the BadResponseException