maproulette / maproulette/maproulette-backend
api/v2/task/:taskId/review/start returns 500 if a review row isn't found
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 53
- Forks
- 39
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Description
example request
GET | https://staging.maproulette.org/api/v2/task/170921569/review/start?mapillary=false
returns an ambiguous 500 error
message | "SqlMappingError(No rows when expecting a single one)"
This could be refined into something easier to understand for API users. I happened to run into this while going through a flow that isn't typically used by maproulette UI users (it's more of a modified dev flow for testing review pages). Regardless, here are the steps to reproduce...
Have 2 users, each logged in a different browser
Your User 1
- start a task
- mark 'Not an Issue'
- In the confirmation modal, DO NOT check 'Request Review'
- copy the URL
- Press submit
Your User 2
6. paste the URL in a user 2's separate browser, adding /review to the end of it. submit the URL by pressing Enter
7. you should see the error, presented in the UI as 'Someone else is reviewing this challenge', which is false information (possible followup UI ticket).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing GET /api/v2/task/:taskId/review/start with the two-user flow described in the issue, then trace the endpoint handling for a missing review row. Confirm the response no longer exposes the ambiguous SqlMappingError and clearly communicates the missing-review condition to API users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100