Running Get-JiraIssue or Get-JiraFilter and putting a JQL query in for -Filter parameter causes the following error:
Resolve-ErrorWebResponse: Method invocation failed because [System.Net.Http.HttpResponseMessage] does not contain a method named 'GetResponseStream'.
This error doesn't really explain what the user is doing wrong, and it might be better to build some input validation around the $Filter parameter (since it should always be a number).
Suggestion(s):
Add conditions for to the $Filter parameter ValidateScript() to ensure that the string is actually a number, or change the Filter parameter to be an Integer
Try/catching the Invoke-JiraMethod call and throwing a more detailed exception.
Running
Get-JiraIssue
orGet-JiraFilter
and putting a JQL query in for-Filter
parameter causes the following error:This error doesn't really explain what the user is doing wrong, and it might be better to build some input validation around the
$Filter
parameter (since it should always be a number).Suggestion(s):
$Filter
parameterValidateScript()
to ensure that the string is actually a number, or change the Filter parameter to be an IntegerInvoke-JiraMethod
call and throwing a more detailed exception.