Nevermind I was able to get it. Here it is for those looking in the future:
(number of statuses whose(“Failed” = it as string) of results of it, name of it,id of it) of member actions whose(exists statuses whose(“Failed” = it as string) of results of it) of top level bes actions whose(49264 = id of it)
This will give you a list of the number of failed patches, name of the failed patch, and most importantly the member action ID of the failed patch. I am then going to use the REST API call to pull down the exit codes using this: