Skip to content

GET /workflow/<serverID> returns incorrect response for missing IDs (should be 404) #323

@Titas-Ghosh

Description

@Titas-Ghosh

Hi @pradeeban ,
I found a mismatch between model and controller handling for missing workflows.
Right now, WorkFlowModel.get() returns (False, 'Record Not Found'), but getWorkflow() only checks for None. Because of that, a missing ID doesn’t cleanly return 404 in all cases.

Any non-existent workflow ID should always return 404 Not Found (with a consistent error message), including when X-Latest-Hash is sent.

Fix

Use one consistent not-found contract:

  • Either return None from WorkFlowModel.get() and keep controller check as-is, or
  • Keep tuple return and update controller to handle it explicitly before parsing/response construction.

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