Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Request failed with status code 400 while trying to log work hours

Pedro Alexandre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 4, 2023

Hi, getting the following error while updating the worklog via VSCode.

Debug info:

 

[2023-01-04 13:09:48:674] curl -X POST -H "Content-Type:application/json" -H "User-Agent:atlascode/2.x axios/0.19.2" -H "X-Atlassian-Token:no-check" -H "Authorization:Bearer xxxxxxx" --data '{"comment":"teste","started":"2023-01-02T10:00:00.000Z","timeSpent":"1h"}' "https://api.atlassian.com/ex/jira/9458c6a3-3d35-49d0-b373-f76ad74f61d3/rest/api/2/issue/GSD-1/worklog?adjustEstimate=new&newEstimate=13h"
[2023-01-04 13:09:48:674] ----------------------------------------------------------------------
[2023-01-04 13:09:48:949]   Error: error creating worklog: Error: Request failed with status code 400

1 answer

0 votes
Wojciech Wardaszko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2023

@Pedro Alexandre I'm not sure how to help you debug your request, but posting your authorization token is a bad idea. I'd strongly recommend censoring it.

As for debugging, I'd recommend checking out the Jira API docs, although I'm unfamiliar with the endpoint you're querying.

Pedro Alexandre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 5, 2023

Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events