mirror of
https://github.com/apple/pkl.git
synced 2026-04-24 01:08:34 +02: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));
|
receivedChecksum));
|
||||||
}
|
}
|
||||||
} catch (PackageLoadError e) {
|
} catch (PackageLoadError e) {
|
||||||
if (e.getMessageName().equals("badHttpStatusCode") && (int) e.getArguments()[0] == 404) {
|
if (e.getMessageName().equals("badHttpStatusCode")) {
|
||||||
return;
|
if ((int) e.getArguments()[0] == 404) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
throw new PklException(
|
||||||
|
ErrorMessages.create(
|
||||||
|
"unableToAccessPublishPackage", pkg.getPackageZipUrl(), e.getArguments()[0]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
} catch (SecurityManagerException e) {
|
} catch (SecurityManagerException e) {
|
||||||
|
|||||||
@@ -1020,6 +1020,9 @@ Published checksum: {2}\n\
|
|||||||
\n\
|
\n\
|
||||||
This likely means that you need to bump the package\'s version.
|
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=\
|
unexpectedPackageLoadError=\
|
||||||
Unexpected error resolving packages for project {0}.\n\
|
Unexpected error resolving packages for project {0}.\n\
|
||||||
\n\
|
\n\
|
||||||
|
|||||||
Reference in New Issue
Block a user