Previous Topic

Next Topic

Book Contents

Book Index

Error Details in REST Responses

Error details were not included in Rest Web Services responses, due to security concerns. Now the details are present, but with omitted stacktrace. The stacktrace field can be included via "mbs.webservices.rest.errors.includeStacktrace" system property set to "true", which defaults to "false".

Example of error response without stacktrace:

{

  "status": 400,

  "code": 50222,

  "description": "Invalid arguments null for operation remove for functional item with identifier fim:group:admin : Incorrect number of arguments for operation 'remove':0; expected: 1",

  "hint": "The arguments values provided in the resource cannot be properly converted to the expected Java types",

  "source": "arguments",

  "exception": {

    "name": "java.lang.IllegalArgumentException",

    "code": -1,

    "message": "Incorrect number of arguments for operation 'remove':0; expected: 1",

    "cause": null,

    "stacktrace": null

   },

"errors": null

}

Example of error response with stacktrace:

{

  "status": 400,

  "code": 50222,

  "description": "Invalid arguments null for operation remove for functional item with identifier fim:group:admin : Incorrect number of arguments for operation 'remove':0; expected: 1",

  "hint": "The arguments values provided in the resource cannot be properly converted to the expected Java types",

  "source": "arguments",

  "exception": {

    "name": "java.lang.IllegalArgumentException",

    "code": -1,

    "message": "Incorrect number of arguments for operation 'remove':0; expected: 1",

    "cause": null,

    "stacktrace": "java.lang.IllegalArgumentException: Incorrect number of arguments for operation 'remove':0; expected: 1...............................

  },

  "errors": null

}