From 2049e4237946b3ffd8f557346b7e8fc1438d3f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Wed, 16 Nov 2022 13:59:47 +0100 Subject: [PATCH] Print suggestion when API returns internal server error (#143) * Print suggestion when API returns internal server error * Change wording --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index af8dfd0a..7e930c7e 100755 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ import ( ) const changesNotSentForReviewMessage = "Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true" +const internalServerError = "googleapi: Error 500" func failf(format string, v ...interface{}) { log.Errorf(format, v...) @@ -190,6 +191,10 @@ func main() { log.Warnf("Sending the edit to review failed. Please change \"Retry changes without sending to review\" input to true if you wish to send the changes with the changesNotSentForReview flag. Please note that in that case the review has to be manually initiated from Google Play Console UI") } } + if strings.Contains(errorString, internalServerError) { + log.Warnf("Google Play API responded with an unknown error") + log.Warnf("Suggestion: create a release manually in Google Play Console because the UI has the capability to present the underlying error in certain cases") + } failf(errorString) }