class_docstr: AI21 Labs provides Jurassic models.
  https://studio.ai21.com/docs/api/
code: def handle_failed_request(api_type: str, response: Dict):
      error_message: str = f"AI21 {api_type} API error -"
  
      # Error messages are returned via 'detail' or 'Error' in response
      if "detail" in response:
          error_message += f" Detail: {response['detail']}"
      if "Error" in response:
          error_message += f" Error: {response['Error']}"
  
      raise AI21RequestError(error_message)
  
file_path: H2O/h2o_hf/helm/src/helm/proxy/clients/ai21_client.py
imports: from typing import Dict, List
  import requests
  from dacite import from_dict
  from helm.common.cache import Cache, CacheConfig
  from helm.common.request import EMBEDDING_UNAVAILABLE_REQUEST_RESULT, Request, RequestResult, Sequence, Token
  from helm.common.tokenization_request import TokenizationRequest, TokenizationRequestResult, TokenizationToken, TextRange, DecodeRequest, DecodeRequestResult
  from .client import Client, wrap_request_time, truncate_sequence
label_desc: Use image node_id 1 for calling the AI21Client obj's underlying member method code with example usage: obj.handle_failed_request(api_type, response) without return types