Issue: RateLimitError: The server had an error while processing your request. Sorry about that!

### Issue you'd like to raise.

I have encountered the following error:
`RateLimitError: The server had an error while processing your request. Sorry about that!`
This is the call stack:
```---------------------------------------------------------------------------
RateLimitError                            Traceback (most recent call last)
[<ipython-input-28-74b7a6f0668a>](https://localhost:8080/#) in <cell line: 55>()
     54 
     55 for sku, docs in documents.items():
---> 56   summaries[sku] = summary_chain(docs)

24 frames
[/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py](https://localhost:8080/#) in __call__(self, inputs, return_only_outputs, callbacks, include_run_info)
    143         except (KeyboardInterrupt, Exception) as e:
    144             run_manager.on_chain_error(e)
--> 145             raise e
    146         run_manager.on_chain_end(outputs)
    147         final_outputs: Dict[str, Any] = self.prep_outputs(

[/usr/local/lib/python3.10/dist-packages/langchain/chains/base.py](https://localhost:8080/#) in __call__(self, inputs, return_only_outputs, callbacks, include_run_info)
    137         try:
    138             outputs = (
--> 139                 self._call(inputs, run_manager=run_manager)
    140                 if new_arg_supported
    141                 else self._call(inputs)

[/usr/local/lib/python3.10/dist-packages/langchain/chains/combine_documents/base.py](https://localhost:8080/#) in _call(self, inputs, run_manager)
     82         # Other keys are assumed to be needed for LLM prediction
     83         other_keys = {k: v for k, v in inputs.items() if k != self.input_key}
---> 84         output, extra_return_dict = self.combine_docs(
     85             docs, callbacks=_run_manager.get_child(), **other_keys
     86         )

[/usr/local/lib/python3.10/dist-packages/langchain/chains/combine_documents/map_reduce.py](https://localhost:8080/#) in combine_docs(self, docs, token_max, callbacks, **kwargs)
    142         This reducing can be done recursively if needed (if there are many documents).
    143         """
--> 144         results = self.llm_chain.apply(
    145             # FYI - this is parallelized and so it is fast.
    146             [{self.document_variable_name: d.page_content, **kwargs} for d in docs],

[/usr/local/lib/python3.10/dist-packages/langchain/chains/llm.py](https://localhost:8080/#) in apply(self, input_list, callbacks)
    155         except (KeyboardInterrupt, Exception) as e:
    156             run_manager.on_chain_error(e)
--> 157             raise e
    158         outputs = self.create_outputs(response)
    159         run_manager.on_chain_end({"outputs": outputs})

[/usr/local/lib/python3.10/dist-packages/langchain/chains/llm.py](https://localhost:8080/#) in apply(self, input_list, callbacks)
    152         )
    153         try:
--> 154             response = self.generate(input_list, run_manager=run_manager)
    155         except (KeyboardInterrupt, Exception) as e:
    156             run_manager.on_chain_error(e)

[/usr/local/lib/python3.10/dist-packages/langchain/chains/llm.py](https://localhost:8080/#) in generate(self, input_list, run_manager)
     77         """Generate LLM result from inputs."""
     78         prompts, stop = self.prep_prompts(input_list, run_manager=run_manager)
---> 79         return self.llm.generate_prompt(
     80             prompts, stop, callbacks=run_manager.get_child() if run_manager else None
     81         )

[/usr/local/lib/python3.10/dist-packages/langchain/llms/base.py](https://localhost:8080/#) in generate_prompt(self, prompts, stop, callbacks)
    133     ) -> LLMResult:
    134         prompt_strings = [p.to_string() for p in prompts]
--> 135         return self.generate(prompt_strings, stop=stop, callbacks=callbacks)
    136 
    137     async def agenerate_prompt(

[/usr/local/lib/python3.10/dist-packages/langchain/llms/base.py](https://localhost:8080/#) in generate(self, prompts, stop, callbacks)
    190             except (KeyboardInterrupt, Exception) as e:
    191                 run_manager.on_llm_error(e)
--> 192                 raise e
    193             run_manager.on_llm_end(output)
    194             if run_manager:

[/usr/local/lib/python3.10/dist-packages/langchain/llms/base.py](https://localhost:8080/#) in generate(self, prompts, stop, callbacks)
    184             try:
    185                 output = (
--> 186                     self._generate(prompts, stop=stop, run_manager=run_manager)
    187                     if new_arg_supported
    188                     else self._generate(prompts, stop=stop)

[/usr/local/lib/python3.10/dist-packages/langchain/llms/openai.py](https://localhost:8080/#) in _generate(self, prompts, stop, run_manager)
    315                 choices.extend(response["choices"])
    316             else:
--> 317                 response = completion_with_retry(self, prompt=_prompts, **params)
    318                 choices.extend(response["choices"])
    319             if not self.streaming:

[/usr/local/lib/python3.10/dist-packages/langchain/llms/openai.py](https://localhost:8080/#) in completion_with_retry(llm, **kwargs)
    104         return llm.client.create(**kwargs)
    105 
--> 106     return _completion_with_retry(**kwargs)
    107 
    108 

[/usr/local/lib/python3.10/dist-packages/tenacity/__init__.py](https://localhost:8080/#) in wrapped_f(*args, **kw)
    287         @functools.wraps(f)
    288         def wrapped_f(*args: t.Any, **kw: t.Any) -> t.Any:
--> 289             return self(f, *args, **kw)
    290 
    291         def retry_with(*args: t.Any, **kwargs: t.Any) -> WrappedFn:

[/usr/local/lib/python3.10/dist-packages/tenacity/__init__.py](https://localhost:8080/#) in __call__(self, fn, *args, **kwargs)
    377         retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
    378         while True:
--> 379             do = self.iter(retry_state=retry_state)
    380             if isinstance(do, DoAttempt):
    381                 try:

[/usr/local/lib/python3.10/dist-packages/tenacity/__init__.py](https://localhost:8080/#) in iter(self, retry_state)
    323             retry_exc = self.retry_error_cls(fut)
    324             if self.reraise:
--> 325                 raise retry_exc.reraise()
    326             raise retry_exc from fut.exception()
    327 

[/usr/local/lib/python3.10/dist-packages/tenacity/__init__.py](https://localhost:8080/#) in reraise(self)
    156     def reraise(self) -> t.NoReturn:
    157         if self.last_attempt.failed:
--> 158             raise self.last_attempt.result()
    159         raise self
    160 

[/usr/lib/python3.10/concurrent/futures/_base.py](https://localhost:8080/#) in result(self, timeout)
    449                     raise CancelledError()
    450                 elif self._state == FINISHED:
--> 451                     return self.__get_result()
    452 
    453                 self._condition.wait(timeout)

[/usr/lib/python3.10/concurrent/futures/_base.py](https://localhost:8080/#) in __get_result(self)
    401         if self._exception:
    402             try:
--> 403                 raise self._exception
    404             finally:
    405                 # Break a reference cycle with the exception in self._exception

[/usr/local/lib/python3.10/dist-packages/tenacity/__init__.py](https://localhost:8080/#) in __call__(self, fn, *args, **kwargs)
    380             if isinstance(do, DoAttempt):
    381                 try:
--> 382                     result = fn(*args, **kwargs)
    383                 except BaseException:  # noqa: B902
    384                     retry_state.set_exception(sys.exc_info())  # type: ignore[arg-type]

[/usr/local/lib/python3.10/dist-packages/langchain/llms/openai.py](https://localhost:8080/#) in _completion_with_retry(**kwargs)
    102     @retry_decorator
    103     def _completion_with_retry(**kwargs: Any) -> Any:
--> 104         return llm.client.create(**kwargs)
    105 
    106     return _completion_with_retry(**kwargs)

[/usr/local/lib/python3.10/dist-packages/openai/api_resources/completion.py](https://localhost:8080/#) in create(cls, *args, **kwargs)
     23         while True:
     24             try:
---> 25                 return super().create(*args, **kwargs)
     26             except TryAgain as e:
     27                 if timeout is not None and time.time() > start + timeout:

[/usr/local/lib/python3.10/dist-packages/openai/api_resources/abstract/engine_api_resource.py](https://localhost:8080/#) in create(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)
    151         )
    152 
--> 153         response, _, api_key = requestor.request(
    154             "post",
    155             url,

[/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py](https://localhost:8080/#) in request(self, method, url, params, headers, files, stream, request_id, request_timeout)
    296             request_timeout=request_timeout,
    297         )
--> 298         resp, got_stream = self._interpret_response(result, stream)
    299         return resp, got_stream, self.api_key
    300 

[/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py](https://localhost:8080/#) in _interpret_response(self, result, stream)
    698         else:
    699             return (
--> 700                 self._interpret_response_line(
    701                     result.content.decode("utf-8"),
    702                     result.status_code,

[/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py](https://localhost:8080/#) in _interpret_response_line(self, rbody, rcode, rheaders, stream)
    761         stream_error = stream and "error" in resp.data
    762         if stream_error or not 200 <= rcode < 300:
--> 763             raise self.handle_error_response(
    764                 rbody, rcode, resp.data, rheaders, stream_error=stream_error
    765             )


```

### Suggestion:

LangChain should handle `RateLimitError` in any case.