Skip to content

Commit

Permalink
fix: correct deployment error code typo (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
junfuchen99 authored Sep 30, 2022
1 parent 7730b18 commit 394c527
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ protected long download(long rangeStart, long rangeEnd, MessageDigest messageDig
if (e.statusCode() == HttpStatusCode.FORBIDDEN) {
throw new PackageDownloadException(getErrorString("S3 GetObject returns 403 Access Denied. "
+ "Ensure the IAM role associated with the core device has a policy granting s3:GetObject"),
e).withErrorContext(e, DeploymentErrorCode.S3_GET_BUCKET_ACCESS_DENIED);
e).withErrorContext(e, DeploymentErrorCode.S3_GET_OBJECT_ACCESS_DENIED);
}
if (e.statusCode() == HttpStatusCode.NOT_FOUND) {
throw new PackageDownloadException(getErrorString("S3 GetObject returns 404 Resource Not Found."
+ "Ensure the IAM role associated with the core device has a policy granting s3:GetObject "
+ "and the artifact object uri is correct"),
e).withErrorContext(e, DeploymentErrorCode.S3_GET_BUCKET_RESOURCE_NOT_FOUND);
e).withErrorContext(e, DeploymentErrorCode.S3_GET_OBJECT_RESOURCE_NOT_FOUND);
}
throw new PackageDownloadException(getErrorString("Failed to download object from S3"), e);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public enum DeploymentErrorCode {
S3_HEAD_OBJECT_RESOURCE_NOT_FOUND(DeploymentErrorType.REQUEST_ERROR),
S3_GET_BUCKET_LOCATION_ACCESS_DENIED(DeploymentErrorType.PERMISSION_ERROR),
S3_GET_BUCKET_LOCATION_RESOURCE_NOT_FOUND(DeploymentErrorType.REQUEST_ERROR),
S3_GET_BUCKET_ACCESS_DENIED(DeploymentErrorType.PERMISSION_ERROR),
S3_GET_BUCKET_RESOURCE_NOT_FOUND(DeploymentErrorType.REQUEST_ERROR),
S3_GET_OBJECT_ACCESS_DENIED(DeploymentErrorType.PERMISSION_ERROR),
S3_GET_OBJECT_RESOURCE_NOT_FOUND(DeploymentErrorType.REQUEST_ERROR),

// Cloud service errors
// resolve component candidates returned more than one version
Expand Down

0 comments on commit 394c527

Please sign in to comment.