Public workflow retrieval returns 500 when unavailable
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Feature Summary
The public-workflow endpoint dereferences the database result without checking whether a public workflow was found. Missing workflows and existing private workflows therefore return 500 instead of 404.
Before: unavailable public workflow lookup returns 500.
Expected: unavailable public workflow lookup returns 404, while a public workflow still returns 200.
Reproduction evidence:
1. Launch Texera from current `main`.
2. Request `GET /api/workflow/publicised/999999` and observe a 500 response.
3. Request the same path for an existing private workflow and observe another 500 response.
4. Request it for a public workflow and observe a 200 response.
Version and commit evidence:
1.3.0-incubating-SNAPSHOT (main)
**Commit Hash (Optional)**
98588bf2ab49aac65ebf002496eb057670e6fc07
**What browsers are you seeing the problem on?**
Not browser-specific.
**Relevant log output**
The endpoint calls workflow getters after the public-only query returns no record.
### Proposed Solution or Design
Expected: unavailable public workflow lookup returns 404, while a public workflow still returns 200.
### Affected Area
Workflow Engine (Amber)
Contributor guide
Assessment
This issue has not been assessed yet.