mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(codepipeline): handle legacy pipelines without versions (#3677)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This commit is contained in:
1 parent
0962adaf23
commit
374b80eb65
2 files changed
+71
-2
No files matched your search
+3
-2
@@ -381,8 +381,9 @@ public class CodePipelineService {
|
||||
|
||||
private ObjectNode getPipelineResponse(JsonNode request, String region, String account) {
|
||||
CodePipelinePipeline pipeline = requirePipeline(account, region, text(request, "name"));
|
||||
int version = request.path("version").asInt(pipeline.getVersion());
|
||||
if (version != pipeline.getVersion()) {
|
||||
int currentVersion = pipeline.getVersion() == null ? 1 : pipeline.getVersion();
|
||||
int version = request.path("version").asInt(currentVersion);
|
||||
if (version != currentVersion) {
|
||||
throw new AwsException("PipelineVersionNotFoundException",
|
||||
"Pipeline version not found: " + version, 400);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user