File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/GitVersion.Core/BuildAgents Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,16 @@ public override string GenerateSetVersionMessage(VersionVariables variables)
27
27
} ;
28
28
29
29
var stringContent = new StringContent ( JsonSerializer . Serialize ( body ) , Encoding . UTF8 , "application/json" ) ;
30
- var response = httpClient . PutAsync ( "api/build" , stringContent ) . GetAwaiter ( ) . GetResult ( ) ;
31
- response . EnsureSuccessStatusCode ( ) ;
30
+
31
+ try
32
+ {
33
+ var response = httpClient . PutAsync ( "api/build" , stringContent ) . GetAwaiter ( ) . GetResult ( ) ;
34
+ response . EnsureSuccessStatusCode ( ) ;
35
+ }
36
+ catch ( Exception ex )
37
+ {
38
+ return $ "Failed to set AppVeyor build number to '{ variables . FullSemVer } '. The error was: { ex . Message } ";
39
+ }
32
40
33
41
return $ "Set AppVeyor build number to '{ variables . FullSemVer } '.";
34
42
}
You can’t perform that action at this time.
0 commit comments