Problem with Forge REST API example for Edit issue

Hi,

The Forge example for https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put has a problem.

In the example code for Forge, the last lines are:

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Calling await response.json() results in an error, e.g.:

ERROR   13:42:06.687  c394ec7e3fa23d76  Unexpected end of JSON input

While the code works (except for that last line) this is confusing.
The simple solution is to just no do that last line, but an update of the example would save time for those (like me) who actually try to use the example codeā€¦ :wink:

Thanks,
Fredrik

2 Likes

Nice catch :slight_smile:
Also, you can use the Rate this page to send a feedback to the documentation team:

Using the ā€˜rate this pageā€™ feature is a good way to flag errors in the documentation. The ā€œsend feedbackā€ dialog will result in the creation of a Jira issue in our internal docs backlog.

See Process to notify error in documentation - #2 by HeyJoe

1 Like

Great tip - feedback given!

Weā€™re running into this also ā€” is there a solution at all?