Skip to content

Response from REST when there's an error is still 200 #3

Description

@dotasek

Relevant to the feature/cyrest branch

To replicate, load galFiltered.cys and click some blank space in the Network Control Panel to make the current network null.

Execute POST /mcode/v1/analyze with the default arguments.

The object returned contains only a partial CIError object, and also returns a 200 code instead of an HTTP error code such as 404 (for missing resource, which a null network would be).

A similar output from the Diffusion returns response code 404 and contains this object:

{
  "data": {},
  "errors": [
    {
      "status": 404,
      "type": "urn:cytoscape:ci:diffusion-app:v1:diffuse_current_view:1",
      "message": "Could not find current Network",
      "link": "file:/Users/hodor/CytoscapeConfiguration/3/framework-cytoscape.log"
    }
  ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions