Closed hmmwhatsthisdo closed 6 years ago
One of the things that may need additional refinement (probably in a separate PR) is how to handle non-JSON/HTML error responses.
For instance, this behemoth is spat out of the API if invalid credentials are passed to Apparently this is/was due to New-JiraSession
. It seems to be a mixture of JavaScript and plain-text, which isn't a particularly easy thing to parse without resorting to regexes or something more hamfisted.Test-ServerResponse
not being called appropriately following edge-case exception behavior during login.
@lipkau The New-JiraVersion
integration tests appear to be 400ing - FWICT this can be caused by trying to create an issue where one with the same name already exists. Can you verify whether this is the case on the integration-test instance?
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 #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: