code: def complete_value_catching_error(
          self,
          return_type: GraphQLOutputType,
          field_nodes: List[FieldNode],
          info: GraphQLResolveInfo,
          path: ResponsePath,
          result: Any,
      ) -> AwaitableOrValue[Any]:
          
          try:
              if isawaitable(result):
  
                  async def await_result():
                      value = self.complete_value(
                          return_type, field_nodes, info, path, await result
                      )
                      if isawaitable(value):
                          return await value
                      return value
  
                  completed = await_result()
              else:
                  completed = self.complete_value(
                      return_type, field_nodes, info, path, result
                  )
              if isawaitable(completed):
                  # noinspection PyShadowingNames
                  async def await_completed():
                      try:
                          return await completed
                      except Exception as error:
                          self.handle_field_error(error, field_nodes, path, return_type)
  
                  return await_completed()
              return completed
          except Exception as error:
              self.handle_field_error(error, field_nodes, path, return_type)
              return None
docs: Complete a value while catching an error.
  
          This is a small wrapper around completeValue which detects and logs errors in
          the execution context.