-
Notifications
You must be signed in to change notification settings - Fork 705
Closed
Description
atlassian-python-api/atlassian/rest_client.py
Lines 988 to 989 in df81dc9
if isinstance(errors, dict) and "message" not in errors: | |
error_msg_list.extend(list(errors.values())) |
File "/usr/local/lib/python3.11/site-packages/atlassian/jira.py", line 1861, in set_issue_status
return self.post(url, data=data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/atlassian/rest_client.py", line 388, in post
response = self.request(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/atlassian/rest_client.py", line 312, in request
self.raise_for_status(response)
File "/usr/local/lib/python3.11/site-packages/atlassian/rest_client.py", line 551, in raise_for_status
raise HTTPError(error_msg, response=response)
requests.exceptions.HTTPError: This field is required
I find the dict is supported in HTTPError
. Is it necessary to convert it to a string?
from requests import HTTPError
errors = {
"duedate": "Field 'duedate' cannot be set. It is not on the appropriate screen, or unknown.",
"assignee": "Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown.",
}
raise HTTPError(errors)
Output
Traceback (most recent call last):
raise HTTPError(errors)
requests.exceptions.HTTPError: {'duedate': "Field 'duedate' cannot be set. It is not on the appropriate screen, or unknown.", 'assignee': "Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown."}
Metadata
Metadata
Assignees
Labels
No labels