Missing workflow returns 500 from workflow type endpoint
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### What happened?
The workflow type endpoint dereferences a missing DAO result. An authenticated request for a workflow ID that does not exist returns 500 instead of 404.
Before: missing workflow returns 500
After: missing workflow returns 404
### How to reproduce?
1. Start the local development stack.
2. Sign in as a regular or admin user.
3. Send `GET /api/workflow/type/2147483647`.
The local response was 500:
```text
{"code":500,"message":"There was an error processing your request."}
```
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Commit Hash (Optional)
7d57cd6ef1
### Relevant log output
The request reaches `workflowDao.fetchOneByWid`, receives null, and then calls `workflow.getIsPublic`.
Contributor guide
Research direction
Start the local development stack, authenticate, and reproduce GET /api/workflow/type/2147483647. Trace the endpoint through workflowDao.fetchOneByWid and verify the missing workflow case; done means the same request returns HTTP 404 rather than 500 for both regular and admin users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100