code: def get_javascript_error(self, return_type='string'):
          
  
          if BROME_CONFIG['proxy_driver']['intercept_javascript_error']:
              js_errors = self._driver.execute_script(
                  'return window.jsErrors; window.jsErrors = [];'
              )
  
              if not js_errors:
                  js_errors = []
  
              if return_type == 'list':
                  if len(js_errors):
                      return js_errors
                  else:
                      return []
              else:
                  if len(js_errors):
                      return os.linesep.join(js_errors)
                  else:
                      return self.no_javascript_error_string
          else:
              if return_type == 'list':
                  return []
              else:
                  return self.no_javascript_error_string
docs: Return the gathered javascript error
  
          Args:
              return_type: 'string' | 'list'; default: 'string'