[results feed] Add error checking for a missing try_build record

We have seen this error occur, and not yet found the root cause.
Provide better information if it occurs again.

Change-Id: Iec1ed37295ca408edaf62983ff7eb66b688811f0
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/132860
Reviewed-by: Jonas Termansen <sortie@google.com>
diff --git a/results_feed/lib/src/components/results_panel.dart b/results_feed/lib/src/components/results_panel.dart
index 2c6c253..587bbef 100644
--- a/results_feed/lib/src/components/results_panel.dart
+++ b/results_feed/lib/src/components/results_panel.dart
@@ -75,8 +75,15 @@
     RelativePosition.OffsetTopLeft
   ];
 
-  String buildbucketID(int patchset, String configuration) =>
-      builds[patchset][builders[configuration]].buildbucketID;
+  String buildbucketID(int patchset, String configuration) {
+    final result = builds[patchset][builders[configuration]].buildbucketID;
+    if (result == null) {
+      throw StateError(
+          "Try builder record missing for builder ${builders[configuration]} "
+          "on patchset $patchset of this CL");
+    }
+    return result;
+  }
 
   String approvalContent(Change change) =>
       change.approved ? formatting.checkmark : '';