ashb commented on a change in pull request #21965:
URL: https://github.com/apache/airflow/pull/21965#discussion_r819654562



##########
File path: airflow/api_connexion/endpoints/task_instance_endpoint.py
##########
@@ -86,6 +87,64 @@ def get_task_instance(
             RTIF.task_id == TI.task_id,
         ),
     ).add_entity(RTIF)
+
+    try:
+        task_instance = query.one_or_none()
+    except MultipleResultsFound:
+        raise NotFound(
+            "Task instance not found", detail="Task instance is mapped, add 
the map_index value to the URL"
+        )
+    if task_instance is None:
+        raise NotFound("Task instance not found")
+    if task_instance[0].map_index != -1:

Review comment:
       ```suggestion
       if task_instance[0].map_index < 0:
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to