@@ -745,6 +745,27 @@ func emitExtrasSkippedSummary(emit func(domain.Event) bool) {
745745
746746func detectExtrasFailure (out string ) string {
747747 lines := strings .Split (strings .ReplaceAll (out , "\r \n " , "\n " ), "\n " )
748+
749+ priorityHints := []string {
750+ "sqlstate[" ,
751+ "thrown in " ,
752+ }
753+ for _ , raw := range lines {
754+ raw = strings .TrimSpace (raw )
755+ if raw == "" {
756+ continue
757+ }
758+ lower := strings .ToLower (raw )
759+ for _ , hint := range priorityHints {
760+ if strings .Contains (lower , hint ) {
761+ return raw
762+ }
763+ }
764+ if strings .HasPrefix (lower , "fatal:" ) || strings .HasPrefix (lower , "error:" ) {
765+ return raw
766+ }
767+ }
768+
748769 hints := []string {
749770 "the limit that is provided for free use of github has been exceeded" ,
750771 "github api rate limit exceeded" ,
@@ -758,6 +779,7 @@ func detectExtrasFailure(out string) string {
758779 "could not resolve host" ,
759780 "failed to download" ,
760781 "failed to open stream" ,
782+ "stack trace:" ,
761783 "package operations: 0 installs, 0 updates, 0 removals" ,
762784 }
763785
@@ -778,6 +800,9 @@ func detectExtrasFailure(out string) string {
778800 if strings .HasPrefix (lower , "fatal:" ) || strings .HasPrefix (lower , "error:" ) {
779801 return raw
780802 }
803+ if strings .HasSuffix (lower , " fail" ) {
804+ return raw
805+ }
781806 if strings .Contains (lower , "exception" ) {
782807 return raw
783808 }
0 commit comments