-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error-handler to accommodate for ErrorDetails and non-JSON/HTML responses #277
Improve error-handler to accommodate for ErrorDetails and non-JSON/HTML responses #277
Conversation
One of the things that may need additional refinement (probably in a separate PR) is how to handle non-JSON/HTML error responses.
|
(as Test-ServerResponse requires it)
@lipkau The |
### IMPROVEMENTS - Added support for paginated response from API server by means of `-Paging` (#291, [@lipkau[]]) - Added full set of functions to manage Filter Permissions (#289, [@lipkau[]]) - Added `-Id` parameter to `Remove-JiraFilter` (#288, [@lipkau[]]) - Changed logic of `Get-JiraUser` to return multiple results for a search (#272, [@lipkau[]]) - Added posts for homepage to the module's repository (#268, [@lipkau[]]) - Improved handling of _Credentials_ (#271, [@lipkau[]]) - Added missing interactions with _Filters_ (#266, [@lipkau[]]) - Added `Remove-JiraIssue` (#265, [@hmmwhatsthisdo[]]) - Improved Build script (to deploy changes to the homepage) (#259, [@lipkau[]]) ### BUG FIXES - Reverted `Add-JiraIssueAttachament` as JiraPS v2.7 broke it (#287, [@lipkau[]]) - Fixed resolving of Remote Link (#286, [@lipkau[]]) - Improved error handling for ErrorDetails and non-JSON/HTML responses (#277, [@hmmwhatsthisdo[]]) - Fully support Powershell v3 (#273, [@lipkau[]]) - Fixed parameter used in documentation but not in code (#263, [@lipkau[]])
### IMPROVEMENTS - Added support for paginated response from API server by means of `-Paging` (#291, [@lipkau[]]) - Added full set of functions to manage Filter Permissions (#289, [@lipkau[]]) - Added `-Id` parameter to `Remove-JiraFilter` (#288, [@lipkau[]]) - Changed logic of `Get-JiraUser` to return multiple results for a search (#272, [@lipkau[]]) - Added posts for homepage to the module's repository (#268, [@lipkau[]]) - Improved handling of _Credentials_ (#271, [@lipkau[]]) - Added missing interactions with _Filters_ (#266, [@lipkau[]]) - Added `Remove-JiraIssue` (#265, [@hmmwhatsthisdo[]]) - Improved Build script (to deploy changes to the homepage) (#259, [@lipkau[]]) ### BUG FIXES - Reverted `Add-JiraIssueAttachament` as JiraPS v2.7 broke it (#287, [@lipkau[]]) - Fixed resolving of Remote Link (#286, [@lipkau[]]) - Improved error handling for ErrorDetails and non-JSON/HTML responses (#277, [@hmmwhatsthisdo[]]) - Fully support Powershell v3 (#273, [@lipkau[]]) - Fixed parameter used in documentation but not in code (#263, [@lipkau[]])
Description
This PR modifies
Invoke-JiraMethod
to improve error-parsing under certain conditions.More specifically, the following changes have been made:
ErrorDetails
field on the associated exception. (see Error handling does not function correctly if Invoke-WebRequest exceptions contain ErrorDetails #276)errorMessages
property versus theerrors
property.Motivation and Context
If Jira (or the web server/proxy used to access it) is using Chunked transfer encoding, for instance, this field may not be populated (see this PowerShell UserVoice post).
This PR resolves #276.
Types of changes
Checklist: