Edgegap Plugin: detailed error message & solution for 'project not found'

This commit is contained in:
mischa 2023-11-05 13:07:49 +01:00
parent c66f40f925
commit 2d3776df6e

View File

@ -9,6 +9,7 @@
using System.Net; using System.Net;
using System.Text; using System.Text;
using System; using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using IO.Swagger.Model; using IO.Swagger.Model;
using UnityEditor.Build.Reporting; using UnityEditor.Build.Reporting;
@ -385,6 +386,13 @@ async void BuildAndPushServer()
return; return;
} }
// project not found?
if (Regex.IsMatch(error, @".*project .* not found.*", RegexOptions.IgnoreCase))
{
onError($"{error}\nTo solve this, make sure that Image Repository is 'project/game' where 'project' is from the Container Registry page on the Edgegap website.");
return;
}
// otherwise show generic error message // otherwise show generic error message
onError($"Unable to push docker image to registry. Please make sure you're logged in to {registry} and check the following error:\n\n{error}"); onError($"Unable to push docker image to registry. Please make sure you're logged in to {registry} and check the following error:\n\n{error}");
return; return;