mirror of
https://github.com/apple/pkl.git
synced 2026-03-18 23:33:55 +01:00
Fix handling of other http error codes when creating packages
This commit is contained in:
committed by
Philip K.F. Hölzenspies
parent
e28d747418
commit
b9e94b94ae
@@ -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) {
|
||||
|
||||
@@ -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\
|
||||
|
||||
Reference in New Issue
Block a user