original_docstring: 
          QRadar error handler for any error occurred during the API request.
          This function job is to translate the known exceptions returned by QRadar
          to human readable exception to help the user understand why the request have failed.
          If error returned is not in the expected error format, raises the exception as is.
          Args:
              res (Any): The error response returned by QRadar.
  
          Returns:
              - raises DemistoException.
          
docstring: QRadar error handler for any error occurred during the API request.
  This function job is to translate the known exceptions returned by QRadar
  to human readable exception to help the user understand why the request have failed.
  If error returned is not in the expected error format, raises the exception as is.
docstring_tokens: QRadar error handler for any error occurred during the API request . This function job is to translate the known exceptions returned by QRadar to human readable exception to help the user understand why the request have failed . If error returned is not in the expected error format raises the exception as is .
code: def qradar_error_handler(res: requests.Response):
          """
          QRadar error handler for any error occurred during the API request.
          This function job is to translate the known exceptions returned by QRadar
          to human readable exception to help the user understand why the request have failed.
          If error returned is not in the expected error format, raises the exception as is.
          Args:
              res (Any): The error response returned by QRadar.
  
          Returns:
              - raises DemistoException.
          """
          err_msg = f'Error in API call [{res.status_code}] - {res.reason}'
          try:
              # Try to parse json error response
              error_entry = res.json()
              message = error_entry.get('message', '')
              if 'items=x-y' in message:
                  message = 'Failed to parse Range argument. The syntax of the Range argument must follow this pattern:' \
                            ' x-y'
              elif 'unauthorized to access' in err_msg or 'No SEC header present in request' in err_msg:
                  message = 'Authorization Error: make sure credentials are correct.'
              elif 'The specified encryption strength is not available' in err_msg:
                  err_msg = ''
                  message = 'The specified encryption is not available, try using a weaker encrpytion (AES128).'
              err_msg += f'\n{message}'
              raise DemistoException(err_msg, res=res)
          except ValueError:
              err_msg += '\n{}'.format(res.text)
              raise DemistoException(err_msg, res=res)
code_tokens: def qradar_error_handler ( res : requests . Response ) : err_msg = f'Error in API call [{res.status_code}] - {res.reason}' try : error_entry = res . json ( ) message = error_entry . get ( 'message' , '' ) if 'items=x-y' in message : message = 'Failed to parse Range argument. The syntax of the Range argument must follow this pattern:' ' x-y' elif 'unauthorized to access' in err_msg or 'No SEC header present in request' in err_msg : message = 'Authorization Error: make sure credentials are correct.' elif 'The specified encryption strength is not available' in err_msg : err_msg = '' message = 'The specified encryption is not available, try using a weaker encrpytion (AES128).' err_msg += f'\n{message}' raise DemistoException ( err_msg , res = res ) except ValueError : err_msg += '\n{}' . format ( res . text ) raise DemistoException ( err_msg , res = res )
short_docstring: QRadar error handler for any error occurred during the API request.
short_docstring_tokens: QRadar error handler for any error occurred during the API request .
comment: """
          QRadar error handler for any error occurred during the API request.
          This function job is to translate the known exceptions returned by QRadar
          to human readable exception to help the user understand why the request have failed.
          If error returned is not in the expected error format, raises the exception as is.
          Args:
              res (Any): The error response returned by QRadar.
  
          Returns:
              - raises DemistoException.
          """$SEP$# Try to parse json error response