Skip to content

Commit

Permalink
Cleaned up error handling a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
replicaJunction committed Aug 5, 2015
1 parent ab776b0 commit 4fa6b57
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Functions/Invoke-JiraIssueTransition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@

Write-Debug "[Invoke-JiraIssueTransition] Preparing for blastoff!"
$result = Invoke-JiraMethod -Method Post -URI $transitionUrl -Body $json -Credential $Credential
Write-Output $result

if ($result)
{
# JIRA doesn't typically return results here unless they contain errors, which are handled within Invoke-JiraMethod.
# If something does come out, let us know.
Write-Debug "[Invoke-JiraIssueTransition] Outputting raw results from JIRA."
Write-Warning "JIRA returned unexpected results, which are provided below."
Write-Output $result
} else {
Write-Debug "[Invoke-JiraIssueTransition] No results were returned from JIRA."
}
}

end
Expand Down

0 comments on commit 4fa6b57

Please sign in to comment.