Skip to content

415 on issueBulkOperations.getAvailableTransitions /rest/api/3/bulk/issues/transition #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Cellule opened this issue Apr 12, 2025 · 3 comments · Fixed by #375 or #376
Closed

415 on issueBulkOperations.getAvailableTransitions /rest/api/3/bulk/issues/transition #374

Cellule opened this issue Apr 12, 2025 · 3 comments · Fixed by #375 or #376
Milestone

Comments

@Cellule
Copy link
Contributor

Cellule commented Apr 12, 2025

This feels like a bug on jira's side where that endpoint returns a status 415 Unsupported Media type error.
If I add header Content-Type: application/json then it works.
I find this a bit weird because this is a GET endpoint it should not required a Content-Type since there's no body
https://stackoverflow.com/a/16693884

Caused by: AxiosError: Request failed with status code 415
 ❯ settle node_modules/.store/axios-npm-1.8.4-8cf735eb2b/package/lib/core/settle.js:19:12
 ❯ IncomingMessage.handleStreamEnd node_modules/.store/axios-npm-1.8.4-8cf735eb2b/package/lib/adapters/http.js:599:11
 ❯ Axios.request node_modules/.store/axios-npm-1.8.4-8cf735eb2b/package/lib/core/Axios.js:45:41

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: {
  description: undefined,
  number: undefined,
  fileName: undefined,
  lineNumber: undefined,
  columnNumber: undefined,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: ['xhr', 'http', 'fetch'],
    transformRequest: ['Function<transformRequest>'],
    transformResponse: ['Function<transformResponse>'],
    timeout: +0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: {
      FormData: 'Function<FormData>',
      Blob: 'Function<Blob>'
    },
    validateStatus: 'Function<validateStatus>',
    headers: {
      Accept: 'application/json, text/plain, */*',
      Authorization: 'Basic ***',
      'User-Agent': 'axios/1.8.4',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    paramsSerializer: {
      serialize: 'Function<bound paramSerializer>'
    },
    baseURL: 'https://maintainx.atlassian.net',
    url: '/rest/api/3/bulk/issues/transition',
    method: 'get',
    params: {
      issueIdsOrKeys: ['JT-36', 'JT-37']
    },
    allowAbsoluteUrls: true
  },
  code: 'ERR_BAD_REQUEST',
  status: 415
}
@Cellule
Copy link
Contributor Author

Cellule commented Apr 12, 2025

I created a support ticket to Atlassian, but I feel it'll be low priority.
I'll open a PR to set the Content-Type on that endpoint in this SDK to unblock if that's okay with you

Cellule added a commit to Cellule/jira.js that referenced this issue Apr 12, 2025
@MrRefactoring MrRefactoring added this to the v4.1.3 milestone Apr 14, 2025
MrRefactoring pushed a commit that referenced this issue Apr 14, 2025
…around api issue (#375)

* Set Content-Type in issueBulkOperations.submitBulkTransition to work around api issue.
Fixes #374

* Fix test typescript build

* Add getAvailableTransitions tests
@MrRefactoring MrRefactoring mentioned this issue Apr 14, 2025
MrRefactoring added a commit that referenced this issue Apr 27, 2025
* Set Content-Type in issueBulkOperations.submitBulkTransition to work around api issue (#375)

* Set Content-Type in issueBulkOperations.submitBulkTransition to work around api issue.
Fixes #374

* Fix test typescript build

* Add getAvailableTransitions tests

* v4.1.3

* Changelog updated

---------

Co-authored-by: Michael "Mike" Ferris <micfer@getmaintainx.com>
@Cellule
Copy link
Contributor Author

Cellule commented Apr 28, 2025

For reference, Jira opened a bug ticket on their side
https://jira.atlassian.com/browse/JRACLOUD-94235
It is pretty low priority so I doubt we'll be able to remove the workaround any time soon

@MrRefactoring
Copy link
Owner

It appears this issue has been resolved by the Jira team, so I will remove the workaround from the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants