Fix handling of other http error codes when creating packages

This commit is contained in:
Mark Robinson
2024-04-20 19:32:39 -07:00
committed by Philip K.F. Hölzenspies
parent e28d747418
commit b9e94b94ae
2 changed files with 11 additions and 2 deletions

View File

@@ -185,8 +185,14 @@ public class ProjectPackager {
receivedChecksum));
}
} catch (PackageLoadError e) {
if (e.getMessageName().equals("badHttpStatusCode") && (int) e.getArguments()[0] == 404) {
return;
if (e.getMessageName().equals("badHttpStatusCode")) {
if ((int) e.getArguments()[0] == 404) {
return;
} else {
throw new PklException(
ErrorMessages.create(
"unableToAccessPublishPackage", pkg.getPackageZipUrl(), e.getArguments()[0]));
}
}
throw e;
} catch (SecurityManagerException e) {

View File

@@ -1020,6 +1020,9 @@ Published checksum: {2}\n\
\n\
This likely means that you need to bump the package\'s version.
unableToAccessPublishPackage=\
Cannot access `{0}`. Got error code `{1}`. Unable to version package contents
unexpectedPackageLoadError=\
Unexpected error resolving packages for project {0}.\n\
\n\