Open mike-lloyd03 opened 1 year ago
In case of an error, go-jira reads and decodes the response body and returns it as an error
, see the code for DoTransitionWithPayloadWithContext
and NewJiraError
.
Hey,
I am very sorry that this issue has been open for a long time with no final solution. We work on this project in our spare time, and sometimes, other priorities take over. This is the typical open source dilemma.
To provide visibility, we created the Road to v2 Milestone and calling for your feedback in https://github.com/andygrunwald/go-jira/issues/489
The development will take some time; however, I hope you can benefit from the changes. If you seek priority development for your issue + you like to sponsor it, please contact me.
We will work on this issue indirectly. This means that during the development phase, we aim to tackle it. Maybe in a different way like it is currently handled. Please understand that this will take a while because we are running this in our spare time.
Thanks for using this library. If there is anything else you would like to tell us, let us know!
Describe the bug
I am abstracting the process of transitioning a Jira issue to a different state. When attempting to transition an issue from
Backlog
toReady
, the Jira web app raises an error telling me I need to define the story points. I'd like to handle this error when automating the process. I have the following function:I am trying to read the response body if there is an error transitioning the issue. But I get the following error when trying to do so:
How can I read the error response from the API?
Expected behavior
The
jira.Response
returned fromDoTransition
should be readable.Your Environment
Include as many relevant details about the environment you experienced the problem in
v1.15.1
go version
):1.18.3
8.13.11
Additional context
I'd like to be able to dynamically handle error responses that come from the API. Or at least be able to print a more helpful error message when a request to transition the issue fails.
Thanks!