docs: def generate_error_json_response(error_dict, error_response_context=None):
      """
      Intends to build an error json response. If the error_response_context is
      None, then we generate this response using data tables format
  
      :param error_dict: str/dict: contains the error message(s)
      :param error_response_context: None/dict: context dictionary to render, if
        error occurs
      :return: JsonResponse
      """
      response = error_dict
      if isinstance(error_dict, str):
          response = {"error": response}
      if error_response_context is None:
          error_response_context = {
              'draw': 0, 'recordsTotal': 0, 'recordsFiltered': 0, 'data': []
          }
      response.update(error_response_context)
      return JsonResponse(response)