Added shouldRetry argument to Error helper method