Skip to content

Commit c554e24

Browse files
authored
Provide more intuitive error message when JFrog feed is inactive (#1427)
1 parent 8e1bba8 commit c554e24

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/code/V3ServerAPICalls.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,15 @@ private JsonElement[] GetJsonElementArr(string request, string propertyName, out
14941494
entries = responseEntries.ToArray();
14951495
}
14961496
}
1497+
catch (JsonException e)
1498+
{
1499+
// scenario where the feed is not active anymore, i.e confirmed for JFrogArtifactory. The default error message is not intuitive.
1500+
errRecord = new ErrorRecord(
1501+
exception: new Exception($"JSON response from repository {Repository.Name} could not be parsed, likely due to the feed being inactive or invalid, with inner exception: {e.Message}"),
1502+
"FindVersionGlobbingFailure",
1503+
ErrorCategory.InvalidResult,
1504+
this);
1505+
}
14971506
catch (Exception e)
14981507
{
14991508
errRecord = new ErrorRecord(

0 commit comments

Comments
 (0)