API errors are always returned in XML format, not in JSON format #2151

Closed
dabest1 opened this Issue Nov 7, 2016 · 0 comments

Projects

None yet

2 participants

@dabest1
dabest1 commented Nov 7, 2016

Bug report

My Rundeck detail

  • Rundeck version: 2.6.9-1
  • install type: rpm
  • OS Name/version: AWS Linux AMI

Expected Behavior

The documentation says that it is possible to return error results in JSON format.
http://rundeck.org/docs/api/index.html#api-version-number

Actual Behavior

The error is always returned in XML format, although successful results are returned in JSON format.

How to reproduce Behavior

Here is an API call without authorization token to create an error result.
curl --silent --show-error -H 'Accept:application/json' -H 'Content-Type:application/json' -X GET https://my_rundeck_server/api/17/execution/160/state
(unauthenticated) is not authorized for: /api/17/execution/160/state

@gschueler gschueler added the bug label Nov 9, 2016
@gschueler gschueler added this to the 2.6.10 milestone Nov 9, 2016
@gschueler gschueler self-assigned this Nov 9, 2016
@gschueler gschueler closed this in 24668ea Nov 10, 2016
@gschueler gschueler removed the in progress label Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment