Skip to content

Commit

Permalink
Provide more intuitive error message when JFrog feed is inactive (#1427)
Browse files Browse the repository at this point in the history
  • Loading branch information
anamnavi authored Oct 4, 2023
1 parent 8e1bba8 commit c554e24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/code/V3ServerAPICalls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,15 @@ private JsonElement[] GetJsonElementArr(string request, string propertyName, out
entries = responseEntries.ToArray();
}
}
catch (JsonException e)
{
// scenario where the feed is not active anymore, i.e confirmed for JFrogArtifactory. The default error message is not intuitive.
errRecord = new ErrorRecord(
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}"),
"FindVersionGlobbingFailure",
ErrorCategory.InvalidResult,
this);
}
catch (Exception e)
{
errRecord = new ErrorRecord(
Expand Down

0 comments on commit c554e24

Please sign in to comment.