hacksu / hacksu/kenthackenough

Deleting a ticket that has already been deleted crashes the server.

Open Beginner friendly
#53 0 comments 0 reactions 0 assignees View on GitHub
bug Good First Issue help wanted
Dominant language
JavaScript
Stars
6
Forks
11
PR merge metrics
No merged PRs in 30d

Description

calling DELETE /tickets/ID after the ticket has been removed crashes the server with the exception

```
TypeError: Cannot read property '_id' of null
at /var/www/kenthackenough/app/tickets/controller.js:78:22
at Query. (/var/www/kenthackenough/node_modules/mongoose/lib/query.js:2120:28)
at /var/www/kenthackenough/node_modules/mongoose/node_modules/kareem/index.js:177:19
at /var/www/kenthackenough/node_modules/mongoose/node_modules/kareem/index.js:109:16
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in app/tickets/controller.js at line 78 and reproduce DELETE /tickets/ID after the ticket has already been removed. Trace the null result from the ticket lookup and verify that deleting a missing ticket no longer crashes the server. No test file is mentioned in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.