Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As per the discussion with CPS team, it was concluded that the proposal for changing the error code response for following API's is not required at the moment. This decision was made in with reference to the research and decisions found at the following Epic CPS Exceptions and REST APIs HTTP Response Codes.  Although an inconsistency was found with the API "Create a Node"  which can be found below at point number 13.  It is to be resolved in upcoming release.

  1. Query a node

  2. Create Schema Set

  3. Get a Schema Set

  4. Delete Schema

  5. Create Anchor

  6. Get All Anchors

  7. Get an Anchor

  8. Delete an Anchor

  9. Get a Node

  10. Delete a Node

  11. Replace Descendants of a Node

  12. Update a data node leaves for a given dataspace and anchor and a parent node xpath

  13. Create Node

    When an invalid json is passed (for example JSON with missing brackets) API returns 400 Bad Request without details.

    When a valid json is passed with typo (for example JSON having a misspelled key) then returns 500 server error, should return 400 with response message

    API: http://IP:PORT/cps/api/v1/dataspaces/<dataspace-name>/anchors/<anchor-name>/nodes?xpath=/

    Current Error Code


    Code Block
     500 Internal Server Error


    Updated Error Code


    Code Block
    {
        "status": "400 BAD_REQUEST",
        "message": "Dataspace not found",
        "details": "Dataspace with name XYZ does not exist."
    }


    Current Error Code


    Code Block
    500 Internal Server Error


    Updated Error Code


    Code Block
     {
        "status": "400 BAD_REQUEST",
        "message": "Anchor not found",
        "details": "Anchor with name ABC does not exist in dataspace XYZ."
    }